Patent ID: 8756288

Claim:
An apparatus in a publish/subscribe messaging environment for routing messages received from at least a first publisher to one or more subscribers according to one or more defined paths through a topic tree that defines topics for routing the messages, the apparatus comprising: a processor; a memory coupled with the processor and holding data defining the topic tree; a first message handler for receiving a message, the message including selection function data defining a selection function, with the handler being adapted to identify and extract the selection function data and store the extracted selection function data in the data defining the topic tree; a further message handler adapted to create, from the received message, a pseudo-topic tree path comprised of a partial path definition and a representation of the selection function; a search engine coupled with the memory and adapted to search the data defining the topic tree, according to the selection function, and to return one or more path definition segments resulting from the search; an inserter coupled with the further message handler and the search engine and adapted to insert each of the one or more returned path definition segments into respective copies of the pseudo-topic tree path, in place of the representation of the selection function, to produce one or more complete path definitions from the partial path definition; and a matching engine coupled with the inserter and adapted to route messages according to each of the one or more produced complete path definitions.