ActiveMQ JMS bridge polling interval - activemq

I plan to use JMS bridge feature of ActiveMQ in order to synchronize my local ActiveMQ Queue with a remote Websphere MQ Queue. I think that the JMS bridging feature is basically polling the WMQ Queue, isn't it ? In this case where can I define the polling duration interval ?
Tks a lot
Nicolas

The ActiveMQ JMS Bridge does not poll, the bridge uses the client library from the broker to be bridged and registers an async consumer to receive incoming messages from the remote Broker. There's nothing to configure in regards to polling.

Related

config Mass transit for both Kafka and RabbitMQ

I want to use Mass Transit with RabbitMQ and Kafka for message broker.
and in deployment phase can decide which one be used for transporting messages.
I know what's ConsumeContext,ISendEndpointProvider, or IPublishEndpoint. And according of the link this Interfaces shared between RabbitMQ and Kafka for publishing messages and consuming that.
I configured both RabbitMQ and Kafka in startup of my .Net Core App and by appSetting in deployment phase can decide which one must be register.
this approach is correct for having and configure both Kafka and RabbitMq in my app?
Using MassTransit, Kafka is a Rider which is configured along with a bus – and the bus still requires a supported transport. If you have RabbitMQ, that would be your bus transport, and the Kafka Rider would exist alongside the bus using the bus for publishing and sending messages.
With Kafka, messages can only be consumed or produced – they cannot be published, nor can they be sent. The ITopicProducer<T> interface is used to produce messages to Kafka topics.
Calling Publish or Send on the ConsumeContext will publish or send those messages to the rider's bus (which may be RabbitMQ, or any supported transport included the InMemory transport). Producing messages to Kafka topics must be done using the ITopicProducer<T> (which may be injected as a dependency to the consumer).
You can't "switch out" RabbitMQ with Kafka as the two services are very different.

Is it possible to establish communication between multiple AMQP brokers

Is it possible to publish/consume messages to ActiveMQ using RabbitMQ libraries and vice versa? Both are AMQP brokers, So I want to check if this is possible or not.
I am asking this question as I have a usecase to migrate our current broker and I dont want my customer to do any changes while consuming messages. This can be any AMQP broker to any other AMQP broker communication
ActiveMQ (both the 5.x and Artemis brokers) support AMQP 1.0. Therefore, any client which communicates over the AMQP 1.0 protocol can interact with the broker regardless of what other brokers that client may be working with.

Spring+RabbitMQ make queues non durable

I am using RabbitMQ as a Stomp broker for Spring Websocket application. The client uses SockJS library to connect to the websocket interface.
Every queue created on the RabbitMQ by the Spring is durable while topics are non durable. Is there any way to make the queues non durable as well?
I do not think I can configure on the application side. I played a bit with RabbitMQ configuration but could not set it up either.
Example destination on RabbitMQ used for SUBSCRIBE and SEND:
services-user-_385b304f-7a8f-4cf4-a0f1-d6ceed6b8c92
It will be possible to specify properties for endpoints as of RabbitMQ 3.6.0 according to comment in RabbitMQ issues - https://github.com/rabbitmq/rabbitmq-stomp/issues/24#issuecomment-137896165:
as of 3.6.0, it will be possible to explicitly define properties for endpoints such as /topic/ and /queue using subscription headers: durable, auto-delete, and exclusive, respectively.
As a workaround you can try to create queues by your own using AMQP protocol and then refer to that queues from STOMP protocol.

MQTT in Producer /consumer context

we are using ActiveMQ for message Queuing with openwire transport.In this context there will be one producer and one consumer with a message listener registered. We heard about MQTT protocol and its support in activeMQ. But i saw examples only for Publisher/subscriber semantics , where subscriber need to call receive method explicitly to get the published message. Can I use mqtt with Producer/Consumer envirnment. Please give a sample..
The MQTT protocol is based a publish / subscribe based model, it has no queuing semantics built into the protocol. If you need Queue's then you need to stick to openwire clients or use a STOMP based client which supports both Topics and Queues.

Stomp ActiveMQ questions

I am new to Stomp ActiveMQ. I want to create a login from an android client and I don't know how to use ActiveMq. I\ve installed active mq, configured stomp and run the stompexample.
1. I have an error when running activemq from command line if I add in in the activemq.xml the following line:
<transportConnector name="stomp+nio" uri="stomp+nio://localhost:61612"/>
<transportConnector name="stomp+ssl" uri="stomp+ssl://localhost:61612"/>
Can someone please explain what is with tx1 and tx2? Is there a way to send on the queue a message to a specific client? how?
connection.connect("system", "manager");
connection.begin("tx1");
connection.send("/queue/test", "message1");
connection.send("/queue/test", "message2");
connection.commit("tx1");
connection.subscribe("/queue/test", Subscribe.AckModeValues.CLIENT);
connection.begin("tx2");
StompFrame message = connection.receive();
System.out.println(message.getBody());
connection.ack(message, "tx2");
message = connection.receive();
System.out.println(message.getBody());
connection.ack(message, "tx2");
connection.commit("tx2");
connection.disconnect();
Can someone please tell me how to create an application that sends on a queue a text containing username, password and receives an answer if the register was successful?
You need to configure the transport connectors with different port numbers, they can't both share port 61612. Your configure is create a Stomp NIO connector and a different Stomp SSL Connector.
You can't send messages to a distinct client, you just place them on a Queue and if there is a client subscribed it will get the message, that's the nature of Queue based messaging. The TX1 TX2 stuff is sending the messages within a transaction.
Recommend you take some time to read up of JMS Messaging, the Stomp spec and some other messaging based tutorials.