qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: qpid + Java without JMS...?
Date Mon, 06 Jul 2009 07:32:20 GMT
Andrew M wrote:
> Could someone direct me to docs or an example showing how to create topics
> with include last image caching using java?

I'm no expert on the JMS clients binding url format. However I modified 
the properties of the direct example[1] as a simple test:

1. create your exchange (I could only get a topic exchange to work):

qpid-config add exchange topic my-exchange --ive

2. configure binding URL for the destination:

destination.directQueue = topic://my-exchange//?routingkey='routing_key'

3. run the Producer

4. now run a Consumer, and see that it (only) gets the last message

Hope this helps.

[1] 
https://svn.apache.org/repos/asf/qpid/trunk/qpid/java/client/example/src/main/java/org/apache/qpid/example/jmsexample/direct

> Thanks,
> Andrew
> 
> -----Original Message-----
> From: Robert Greig [mailto:robert.j.greig@gmail.com] 
> Sent: Friday, July 03, 2009 8:35 AM
> To: users@qpid.apache.org
> Subject: RE: qpid + Java without JMS...?
> 
> My issue at the time was why have a 'unnamed' exchange? Why not just use
> amq.direct? Also why bake that into the protocol rather than just allowing
> implementations to offer that as an option - if you are using a higher level
> abstraction such as JMS or WCF the bindings are reliably handled for you.
> 
> RG
> 
> -----Original Message-----
> From: Gordon Sim <gsim@redhat.com>
> Sent: 03 July 2009 02:59
> To: users@qpid.apache.org
> Subject: Re: qpid + Java without JMS...?
> 
> Robert Greig wrote:
>> I seem to recall that we bind both to the unnamed exchange and
>> amq.direct. There was a lot of debate at the time about this (well I
>> argued about it!). I was and still am of the opinion that the unnamed
>> exchange is pointless and confusing and introduced for a very bad
>> reason - namely treating the protocol as an API.
> 
> Yes, there is always a binding to the default exchange for each queue, 
> using the queue name as the binding key. This is created automatically 
> by the broker and the bindings from the default exchange cannot be 
> altered (except indirectly through the creation and deletion of queues).
> 
> The default exchange in my view is that it provides an error free direct 
> addressing mode for queues and avoids the need for any explicit bindings 
> in that simple case. To me that has value.
> 
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
> 
> 
> No virus found in this incoming message.
> Checked by AVG - www.avg.com 
> Version: 8.5.375 / Virus Database: 270.12.90/2200 - Release Date: 07/02/09
> 18:06:00
> 
> 
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:users-subscribe@qpid.apache.org
> 


---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Mime
View raw message