I want to design a rounding policy for several components:
// | exchange | type | routing key | queue |
// |--------------|-------|----------------------------|------------------------------|
// | processing | topic | processing.trx.elavon | processing-elavon-sale |
// | processing | topic | processing.trx.elavon | processing-elavon-authorize |
// | processing | topic | processing.trx.elavon | processing-elavon-capture |
// | processing | topic | processing.trx.genesis | processing-genesis-sale |
I tried with Topic exchange and Direct exchange but I get error Reply received after timeout
. After investigation it turns out that I'm sending messages to 1 queue but 2 queues are receding messages.
My caseI would like to use routing key and as additional level or abstraction as configuration variable for the target gateway and then to send the type of message to a queue.
But looks like this design is not appropriate.
What routing policy should be more suitable in order to avoid the error: Reply received after timeout
? Only one queue should receive the message and reply.
EDIT:
In my case I use Spring AMQP to send messages:
convertSendAndReceive(
ContextServer.EXCHANGE_PROCESSING, ContextServer.ROUTING_KEY_PROCESSING_TRANSACTION_ELAVON, "some_payload");
But how I can reach just one queue processing-elavon-sale
, not all queues bind to routing key processing.trx.elavon
?