I need the queue to enforce no-duplicate policy. Is it possible? If so , how? (I've been googling for hours... )
Edit:
The ActiveMQSession implementation has this lines:
// transform to our own message format here
ActiveMQMessage msg = ActiveMQMessageTransformation.transformMessage(message, connection);
// Set the message id.
if (msg == message) {
msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber));
} else {
msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber));
message.setJMSMessageID(msg.getMessageId().toString());
}
The ActiveMQMessageTransformation is plugable (you can set it) , but the following if statement is a rather incontrovertible .
Any ideas , except changing their code?
Log in as administrator into Apache ActiveMQ. Click Manage ActiveMQ broker, then click Queues. Click Delete in the operations column for the queue that you want to delete.
Select Queues from the menu bar of the ActiveMQ admin console. Enter a queue name in the field Queue Name E.g. Test_queue and click on Create. The queue is created and displayed in the Queues section. The JMS Queue is created.
How does ActiveMQ work? Written in Java, ActiveMQ translates messages from sender to receiver. It can connect multiple clients and servers and allows messages to be held in queue, instead of requiring both the client and server to be available simultaneously in order to communicate.
ActiveMQ has a settings which limits number of messages that can be browsed by a client. By default, it's 400. This setting prevents QueueExplorer to read all (or top 1000, Top 10000, etc) messages from the queue.
ActiveMQ has duplicate message detection built in - how are you defining a duplicate ? If the duplicate has the same messageId - it should be discarded
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With