Hello,
I've just started to play with Qpid (M3) and the python client. The
company I work for is interested in using Qpid or Red Hat MRG Messaging
(instead of IBM MQ). We have read the AMQP 0-10 spec and the examples
and unit tests that are part of M3, but when writing or own tests we
haven't been able to figure out how to do a couple of things.
The test scenario is this, we just want to send a lot of messages
directly from application A to application B and never want to
experience any loss of messages. Our queue is currently declared like
this (python):
session.queue_declare(queue="testQueue1",
durable=True,
auto_delete=False,
exclusive=True)
session.exchange_bind(exchange="amq.direct",
queue="testQueue1",
binding_key="testQueue1")
Messages are transferred from application A like this:
dprops = session.delivery_properties(routing_key="testQueue1")
msg = qpid.datatypes.Message(dprops, "X" * 2**16)
session.message_transfer(destination='amq.direct',
message=msg)
Both of our test applications are written in python and are running on
the same (multi-core) machine as the broker.
Now to my two newbie questions.
Q1. If messages are produced faster than the consumer can handle them,
how do you configure flow control? Either some form of credit or
something like a "rejected message" exception thrown when the
producer transfer a message that overflows the queue, would be
interesting for us.
Q2. What happen to messages sent to an exchange, that for some reason
has not (yet) been declared and bound as above. In our example the
messages just disappear.
We would like to be able to setup (delivery-properties?) so that the
message_transfer will throw an appropriate exception, and then the
producer simply need to retry until the messages are not rejected.
What is the correct way to achieve this?
Any help would be appreciated!
Thanks,
Patrik