Skip to content

Instantly share code, notes, and snippets.

View lulf's full-sized avatar

Ulf Lilleengen lulf

View GitHub Profile
@lulf
lulf / client_a.txt
Created June 29, 2016 11:28
EnMasse bench results
Launching with args: -c 1 -h 172.30.87.28 -p 5672 -a anycast -d 120 -s 128
Receiver connected to router Router.qdrouterd-k3f6y
Sender connected to router Router.qdrouterd-k3f6y
Result:
Duration: 119 s
Messages: 3064809
Throughput: 25754 msgs/s
Latency avg: 7285.153387698874 us
Latency 50p: 6440..6450 us
Latency 75p: 9080..9090 us
@lulf
lulf / Main.java
Created August 5, 2016 11:00
JMS clients
package org.apache.qpid.jms.example;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
class Main {
public static void main(String [] args) throws InterruptedException {
if (args.length < 1) {
@lulf
lulf / flavors.json
Created September 2, 2016 09:44
flavor example
apiVersion: v1
kind: ConfigMap
metadata:
name: flavors
data:
json: |
{
"vanilla": {
"shared_cluster": true,
"spec": {
@lulf
lulf / ragent log
Created September 2, 2016 09:48
broadcast test debug
error on updating addresses for Router.controller-mytopic-0eyn4: Not Found,Not Found,Address prefix conflicts with an existing entity,Address prefix conflicts with an existing entity
retrieved addresses for Router.controller-mytopic-0eyn4: {"org.apache.qpid.dispatch.router.config.address":{"name":"myqueue","multicast":false,"store_and_forward":true},"distribution":{"name":"anycast","multicast":false,"store_and_forward":false},"broadcast":{"name":"broadcast","multicast":true,"store_and_forward":false}}
retrieved link routes for Router.controller-mytopic-0eyn4: raw-> [{"name":null,"identity":"1","type":"org.apache.qpid.dispatch.router.config.linkRoute","prefix":"mytopic","distribution":"linkBalanced","connection":"broker","containerId":null,"dir":"in","operStatus":"active"},{"name":null,"identity":"2","type":"org.apache.qpid.dispatch.router.config.linkRoute","prefix":"mytopic","distribution":"linkBalanced","connection":"broker","containerId":null,"dir":"out","operStatus":"active"},{"name":null,"identity":"3","t
@lulf
lulf / code.java
Last active September 27, 2016 11:03
this.locator = ActiveMQClient.createServerLocator(String.format("tcp://%s:%s", mgmtEndpoint.hostName(), mgmtEndpoint.port()));
this.sessionFactory = locator.createSessionFactory();
this.session = sessionFactory.createSession();
ClientRequestor requestor = new ClientRequestor(session, "jms.queue.activemq.management");
ClientMessage message = session.createMessage(false);
ManagementHelper.putOperationInvocation(message, address, "listAllSubscriptionsAsJSON");
session.start();
ClientMessage reply = requestor.request(message);
/usr/sbin/future.js:91
this.callback(this.get_error());
^
TypeError: undefined is not a function
at FutureSet.complete (/usr/sbin/future.js:91:14)
at Future.complete (/usr/sbin/future.js:43:14)
at ConnectedRouter.incoming (/usr/sbin/router.js:492:6)
at emit (events.js:107:17)
at Connection.dispatch (/node_modules/rhea/lib/connection.js:190:37)
at Session.dispatch (/node_modules/rhea/lib/session.js:384:41)
@lulf
lulf / openshift-metrics-instructions.md
Last active March 24, 2017 21:00
Setting up hawkular metrics with openshift
  1. Setup hawkular with OpenShift. For local deployment, doing oc cluster up --metrics should be enough. For advanced install, see https://docs.openshift.org/latest/install_config/cluster_metrics.html
  2. Make sure your user is setup with cluster-admin privileges (either oc login -u system:admin or use oc --config )
  3. Select the openshift-infra project (using default is also OK, but I usually deploy all the metrics stuff in openshift-infra)
  4. Deploy hawkular-openshift-agent for collecting metrics from EnMasse. Follow the instructions at https://github.com/openshift/origin-metrics#deploying-the-hawkular-openshift-agent (NOTE: When processing the hawkular-openshift-agent template, set IMAGE_VERSION=1.4.0.Final to ensure that it doesn't crash when handling mbean wildcards)
  5. Deploy EnMasse to desired project/namespace
  6. Deploy the hawkular-grafana using one of these templates: https://github.com/hawkular/hawkular-grafana-datasource/tree/master/docker/openshift . This will build t
diff --git a/systemtests/src/main/java/io/enmasse/systemtest/TestUtils.java b/systemtests/src/main/java/io/enmasse/systemtest/TestUtils.java
index d0a0ff0c..1726d027 100644
--- a/systemtests/src/main/java/io/enmasse/systemtest/TestUtils.java
+++ b/systemtests/src/main/java/io/enmasse/systemtest/TestUtils.java
@@ -223,6 +223,7 @@ public class TestUtils {
* @throws Exception
*/
public static void setAddresses(AddressApiClient apiClient, Kubernetes kubernetes, TimeoutBudget budget, AddressSpace addressSpace, boolean wait, Destination... destinations) throws Exception {
+ long start = System.nanoTime();
apiClient.setAddresses(addressSpace, destinations);
---
apiVersion: enmasse.io/v1beta1
kind: AddressSpace
metadata:
name: space1
spec:
type: brokered
plan: brokered-single-broker
authenticationService:
name: none-authservice

Getting Started

This guide will walk through the process of setting up EnMasse and clients for sending and receiving messages.

Prerequisite
  • A Kubernetes cluster (or Kubernetes-compatible such as OpenShift). You can use minikube if you want to try EnMasse on your laptop.