Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to control in runtime (on row level) destination queue name used in tMomOutput component (ActiveMQ event bus)?
I need to build a "router" which will route dynamically incoming messages by different queues.
Target queue name can be found in one of row attributes (got from database along with data for message contents)
As the queue initialization is done before tMomOutput we have to explicitly add the following line to update the queue in case if we need to pass the message the dynamic queues. The following line has to be added one step before the to tMomOutput. The tMomOutput To field can be set with the dummy queue name.
javax.jms.Destination des_tMomOutput_1;
des_tMomOutput_1 = session_tMomOutput_1.createQueue("DestinationQueueName");
producer_tMomOutput_1 = session_tMomOutput_1.createProducer(des_tMomOutput_1);