You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Chris Richardson <cr...@fourc.eu> on 2015/04/21 14:24:20 UTC

Qpid broker hooks

Hi,

We're interested in customising some of the behaviour of the broker,
particularly in the context of routing and setting custom properties on
messages as they transit the broker. Can you tell me if there's mechanism
eg: hooks/plugins to allow us to do this, or any plans to implement such a
thing?

Thanks

Chris

-- 

*Chris Richardson*, System Architect
cr@fourc.eu


*FourC AS, Vestre Rosten 81, Trekanten, NO-7075 Tiller, Norwaywww.fourc.eu
<http://www.fourc.eu/>*

*Follow us on LinkedIn <http://bit.ly/fourcli>, Facebook
<http://bit.ly/fourcfb>, Google+ <http://bit.ly/fourcgp> and Twitter
<http://bit.ly/fourctw>!*

Re: Qpid broker hooks

Posted by Gordon Sim <gs...@redhat.com>.
On 05/20/2015 04:27 PM, Tor Rune Skoglund wrote:
> On a LAN that we fully control, machine A connects to machine B running
> the broker to send off a message. The connecting IP address of machine A
> is known "somewhere" on the host that runs the broker. When the message
> arrives at the broker, we would like to add or modify a custom header
> field (or change one) to the message, related to the sender's (A's)
> IP-address.
>
> For this, it would be very nice to have an interface in the broker to
> add "hooks" that could run user-defined code on events like the one
> described above.
>
> So what do you see as our options here? The best answer would be that
> "we plan to implement hooks in version X.Y", however, any other
> suggestion would be welcomed :)

You could create a specialised exchange type (most likely based on one 
of the existing types), that added an 'annotation' describing the sender 
on all messages routed through it.

That does use what are generally considered 'internal' APIs, but in 
reality these do not change much. If you look at the changes to the 
'XmlExchange' for example you can see it hasn't changed frequently, and 
the full set of changes - 
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.h?view=log 
- includes some that were not driven by interface changes.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Qpid broker hooks

Posted by Tor Rune Skoglund <tr...@swi.no>.
Den 22. april 2015 15:46, skrev Gordon Sim:
> On 04/21/2015 01:24 PM, Chris Richardson wrote:
>> We're interested in customising some of the behaviour of the broker,
>> particularly in the context of routing and setting custom properties on
>> messages as they transit the broker. Can you tell me if there's mechanism
>> eg: hooks/plugins to allow us to do this, or any plans to implement
>> such a
>> thing?
> 
> Which broker? The java or the c++ one? For the c++ broker there are one
> or two 'internal' extension points, e.g. you can create custom exchange
> types, set various listeners etc.
> 
> I say 'internal' because there isn't really any stable API for broker
> internals. Most of the extension points are there to allow simpler
> implementation of additional features in the tree (e.g. ha uses lots).

c++ one. Let me explain the use case:

On a LAN that we fully control, machine A connects to machine B running
the broker to send off a message. The connecting IP address of machine A
is known "somewhere" on the host that runs the broker. When the message
arrives at the broker, we would like to add or modify a custom header
field (or change one) to the message, related to the sender's (A's)
IP-address.

For this, it would be very nice to have an interface in the broker to
add "hooks" that could run user-defined code on events like the one
described above.

So what do you see as our options here? The best answer would be that
"we plan to implement hooks in version X.Y", however, any other
suggestion would be welcomed :)

BR,
Tor Rune Skoglund, FourC AS


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Qpid broker hooks

Posted by Gordon Sim <gs...@redhat.com>.
On 04/21/2015 01:24 PM, Chris Richardson wrote:
> Hi,
>
> We're interested in customising some of the behaviour of the broker,
> particularly in the context of routing and setting custom properties on
> messages as they transit the broker. Can you tell me if there's mechanism
> eg: hooks/plugins to allow us to do this, or any plans to implement such a
> thing?

Which broker? The java or the c++ one? For the c++ broker there are one 
or two 'internal' extension points, e.g. you can create custom exchange 
types, set various listeners etc.

I say 'internal' because there isn't really any stable API for broker 
internals. Most of the extension points are there to allow simpler 
implementation of additional features in the tree (e.g. ha uses lots).


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org