On Wed, May 28, 2008 at 2:21 PM, Robert Greig <[EMAIL PROTECTED]>
wrote:

> 2008/5/28 Robert Godfrey <[EMAIL PROTECTED]>:
>
> > It is, indeed, a major omission of AMQP 0-8 / 0-9 that there is no
> > synchronous publish method in the protocol.  This  is rectified in
> > 0-10.
>
> Rajith - is this an option in our trunk JMS client?


Tim/Rob,

You can do this in the trunk client while using only the JMS API.
If you know your message sizes (payload) then you can set
-Dmessage_size_before_sync=x and then it will issue a sync after that amount
of bytes are transfered.
It will then block until the broker signals completion. For the persistent
case this means it has hit the disk (C++ broker).

This will of course not be effective if you have varying message sizes.
We could easily add a jvm argument to track messages. Ex
Dmessage_count_before_sync=x.
Setting that to 1 will give you what you want.
You could also do this per connection or destination by specifying it as an
option.

There was also some discussion on making the session entirely sync or async
based on an argument.
In such a case every AMQP command will be synchrnous. I think C++ client
already has this option (or trying to add it).
Maybe we could do this for JMS folks who want that kinda behaviour by
specifying a jvm argument or connection argument.

So in summary it is certainly possible to do this while still using only JMS
API.

Regards,

Rajith

Reply via email to