IBMMQ push subscription : Is there a way in springboot/quarkuks/other to use push subscription? Not polling - spring-boot

Push-subscription
Is there a way in springboot or quarkus (or other framework) to consume messages from IBMMQ using push-subscription. I.e Not polling every minute to see if message exists.
Need not be JMS api.
The DefaultJms... in springboot is polling 1000x times more than the actual messages per day. It is not behaving as ' listener waiting for message push'

You could consume messages from IBM MQ using vert.x's AMQP client. This is a reactive toolkit that will give you an easy way of communicating with IBM MQ using the AMQP channel. Vert.x's AMQP client listens and reacts for push from IBM MQ.

Related

Bridge between two WebSocket STOMP servers

We have an ActiveMQ server and our own API with WebSocket/STOMP service endpoint.
Is there a way to configure ActiveMQ to connect and subscribe to a topic in our API and then publish the messages in ActiveMQ?
If not, are there any other WebSocket/STOMP bridge components which could be used to achieve the same thing (subscribe to a topic in our API and post messages to a topic in ActiveMQ)?
The motivation of all this is... complicated.
ActiveMQ natively supports Camel routes. You could potentially use Camel's STOMP component to subscribe to your own STOMP endpoint and then send those messages to a local destination.

How to automatically read/receive message from solace queue when application started?

I want to automatically read/receive messages from solace queue/topic if any message produced or published when my application is up. So is there any method in solace which can open connection automatically if there is any message available in Queue/Topic.
So is there any method in solace which can open connection automatically if there is any message available in Queue/Topic
This is not possible for JMS.
JMS applications initiate a connection to the broker and receive messages over the locally initiated connection.
The only way to do what you want is to use REST instead of JMS.
When a REST consumer is configured, the Solace event broker will initiate a HTTP connection to the application.
A sample can be found here:
https://solace.com/samples/solace-samples-rest-messaging/publish-subscribe/

Spring Integration - ActiveMQ to Kafka

I am currently trying to write an adapter which will consume messages from ActiveMQ and publish it to Kafka.
I am thinking of using spring integration to integrate these two messaging systems.
My problem is that my application will not maintain registry of the Models using which many applications will publish the records to activeMQ. I want to receive these javax jms message and want to perform some transformation like adding jmscorrelationId into kafka message.
ALso, another requirement is to send acknowledgement to active mq only when kafka send/publish is successfull.
Can ack be send back to activemq using spring integration?
Will spring integration be a good option?
Kindly note my tech architect is not in favor of using Camel/Mule. Also, he does not want to use Kafka Connect as i was planning to use Kafka connect source.
Please suggest.
The Spring Integration Kafka extension project has a sync mode for publishing, which will block the thread until Kafka confirms delivery (or throw an exception on a failure).
The JMS inbound gateway can be used to return a reply to a JMS queue.
You can add transformers (or whatever) in the flow to modify the message.

Is It possible if i have put message to ActiveMq jms and consume it from RabbitMq jms?

I am new to jms,
I have did poc of spring jms with ActiveMq. In which I am producing messages in queue and consume it using consumer and one poc in which I am using spring jms with rabbitmq with producer and consumer and have added plugin of jms in rabbit mq to use spring jms with rabbitmq.
Is it Possible if I put Produce message in active MQ and Consume that messages using spring jms rabbitmq consumer?
Is It possible if yes then How?
Thanks in advance.
ActiveMQ and RabbitMQ are two different brokers - why do you need (and why do you think it's possible) to send messages to one broker and receive them from another?
You would need another application to move the messages; it's not clear why you would want to do that.
Typically, you would need an adapter layer to move the JMS messages from one MQ to another (i.e., active MQ to Rabbitmq etc.).
You can look here for some notes (IBM specific) on JMS adapters, but the underlying concept is the same i.e., consuming from one MQ and producing the messages to another MQ.

Is EJB MDB is JMS Push model or Pull model?

We all know using EJB MDB we can consume the messages through Pub/Sub or with P2P. When i saw the comparision usually according to JMS specification, Pub/Sub is using push model and P2P is using Pull model.
Is it true, can't i consume the P2P messages in MDB using push model? Should we do any configuration changes or it is purely an server providers implementation or both.
thanks
You are speaking about difference between Topic and QUeue. So, Pub/Sub it is Topic and P2P it is Queue. Implementing push or pull model depends of server and you cannot change that behavior.
The difference between Pub/Sub and P2P is how the messages are distributed. A message sent to a topic (via Pub/Sub) is distributed to every consumer. A message sent via P2P is sent to one consumer.
The MDB programming model is a push one. Whether this is implemented as push vs pull is down to how the Resource Adapter and messaging system is implemented. WebSphere MQ and the WebSphere Application Server default messaging provider are both able to push messages to the application server for both Pub/Sub and P2P.

Resources