Can any one provide example on Apache Apollo Queue producer and consumer from JAVA ?
Earlier I was using Apache ActiveMQ but now I want to migrate.
There are several examples in the Apollo distribution. The ones you want to look at are located in the following distribution directories:
examples/openwire/java
examples/stomp/java
examples/mqtt/java
examples/amqp/java
If you are using the protocol supported by Apollo then I dont see any changes required in the producer and consumer if they are already sending messages to ActiveMQ. Except the broker url if that has changed.
you will need to get the following jar files:
https://people.apache.org/~rgodfrey/qpid-java-amqp-1-0-client-jms.html and the javax.jms one. After that it's pretty simple to use the examples that come with apollo.
I start a listener from the bin folder using:
java -cp example/geronimo-jms_1.1_spec-1.1.jar:example/javax.jms-3.1.2.2.jar:example/qpid-amqp-1-0-client-0.22.jar:example/qpid-amqp-1-0-client-jms-0.22.jar:example/qpid-amqp-1-0-common-0.22.jar:. example.Listener topic://event
and similar for the Producer.
Related
I'm using apache camel for consuming an IBM Mq, I use jms for that, everything is ok that works fine, but in the performance testing the api create a lot of dynamic queues but just use once, I've used a lot of properties for solve this problem but I didn't get it yet. my api use a pattern InOut so the responses are in queue in a dynamic queue, when exist a lot of them, for example my api create 50 dynamic queues, but just use 3 of them.
Here are the properties I used to solve it, but didn´t work for me:
-maxConcurrentConsumers
-conccurrentConsumers
-threads
I found a solution for this and is this.
this is my consume to mq
.setHeader("CamelJmsDestinationName",
constant("queue:///"+queue+"?targetClient=1"))
.to("jms://queue:" + queue
+"?exchangePattern=InOut"
+"&replyToType=Temporary"
+"&requestTimeout=10s"
+"&useMessageIDAsCorrelationID=true"
+"&replyToConcurrentConsumers=40"
+"&replyToMaxConcurrentConsumers=90"
+"&cacheLevelName=CACHE_CONSUMER")
.id("idJms")
and this is the properties to connect the mq
ibm.mq.queueManager=${MQ_QUEUE_MANAGER}
ibm.mq.channel=${MQ_CHANNEL}
ibm.mq.connName=${MQ_HOST_NAME}
ibm.mq.user=${MQ_USER_NAME}
ibm.mq.additionalProperties.WMQ_SHARE_CONV_ALLOWED_YES=${MQ_SHARECNV}
ibm.mq.defaultReconnect=${MQ_RECONNECT}
# Config SSL
ibm.mq.ssl-f-i-p-s-required=false
ibm.mq.user-authentication-m-q-c-s-p=${MQ_AUTHENTICATION_MQCSP:false}
ibm.mq.tempModel=MQMODEL
the issue was in the MQ Model, the MQModel has to be shared if you are using the pattern inOut, this is because the concurrent create dynamic queues using the mqModel
If you access this URL -> https://apacheignite.readme.io/docs/jdbc-driver#section-streaming-mode
There it is mentioned that we can use streaming mode using cfg connection that has to be provided using ignite-jdbc.xml file.
But what are the contents of that file? How do we configure?
As that same page notes, it's "a complete Spring XML configuration." Have a look in the "examples" directory of the Ignite download for some samples, but the important thing is how to find the rest of the cluster.
Please note that preferred option for streaming with JDBC is using thin client driver (which neither needs an XML nor starts a client node) together with SET STREAMING ON.
I have been working on a kafka connector lately & i wanted to know where to configure the topics my sink connector's worker task should listen at.
Typically a SinkConnectorConfig looks like this
name=MySinkConnector
tasks.max=1
connector.class=com.operative.creative.bi.sink.MySinkConnector
topics=demo
filePath=/tmp/output.txt
and these settings can be overridden when using the rest-proxy to control the worker configs. I want to know where do we specify the topic.
I know the property file defines a property called "topics" but i didn't see anything reading it in the boiler plate code.
Any help will be appreciated.
topic = props.get(TOPIC_CONFIG);
Have a look at https://docs.confluent.io/current/connect/devguide.html#connector-example, and also https://gist.github.com/jcustenborder/b9b1518cc794e1c1895c3da7abbe9c08
I am newbie to jMeter(using 2.11.20151206). I am trying to publish jms Messages to my weblogic's queue. I have already copied needed jars(weblogic.jar, wlclient.jar & wljmsclient.jar) to jmeter's lib directory. And, restarted the Jmeter many times. But still Jms publishers are not shown in list of samplers.
Is there any other jars needed ? or anything needes to be done.
got the answer from here !. In addition, jmeter also needs javax.jms.jar.
Hello I have a WebService Client on my java project the which is on weblogic. Now I need add the header for security reasons to my petition. I have tried everything and finally a friend help me with a code for Jboss the which works fine on Jboss, but on weblogic it gives me a problem with of castClassException.
Like the title said the original class is "ClientInstanceInvocationHandler" and I need that on "ClientProxy" of APACHE CXF
Here is the problem:
org.apache.cxf.endpoint.Client client = ClientProxy.getClient( port );
Does anyone have a solution?
According to this site https://community.oracle.com/thread/2467175?tstart=0 the problem is that the Apache classes are not properly on the classpath of the server.
They said they "set the APACHE CXF jars as a User Defined Library and set it to the 'Deployed by Default' option".
In this blog with the same problem, they use the following fragment in their weblogic-application.xml:
<prefer-application-resources>
<resource-name>META-INF/services/javax.xml.ws.spi.Provider</resource-name>
</prefer-application-resources>
From what I can understand weblogic returns it's own implementations for these methods unless you tell it to prefer the standard interface and put an implementation of the standard interface on the classpath. I guess the custom class gives some extra performance or features beyond the standard interface.
The Apache CXF site itself addresses this in a similar way, but suggests a different package name (javax.jws.*)
In addition to all this, some people had problems getting weblogic to find and recognise the jars because it was loading weblogic classes in preference and had to do the following:
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
But I have seen variations on this, depending on where your Apache jars are located.