cannot use remote topic in composite-queue

View: New views
5 Messages — Rating Filter:   Alert me  

cannot use remote topic in composite-queue

by Eric Yung :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Could I define a composite-queue which includes a topic defined in another router?

e.g.

in router 1, I define the topic as

  <swiftlet name="sys$topicmanager">
    <slow-subscriber-conditions>
      <topic name="t_1" max-messages="10000" persistence-mode="all"/>
    </slow-subscriber-conditions>
    <static-remote-router-subscriptions/>
    <topics>
      <topic name="t_1"/>
    </topics>
  </swiftlet>


in router 2, I define a composite-queue including the above topic

    <composite-queues>
      <composite-queue name="comp_queue">
        <queue-bindings>
          <queue-binding name="queue1"/>
          <queue-binding name="queue2"/>
        </queue-bindings>
        <topic-bindings>
          <topic-binding name="t_1"/>
        </topic-bindings>
      </composite-queue>
    </composite-queues>


I tried the above configuration and there are error message from router2's log file.

2009-05-24 18:08:46.127/sys$queuemanager/ERROR/Composite Queue 'comp_queue@router2': Topic Binding, topic 't_1' not found!



Regards,
Eric


Re: cannot use remote topic in composite-queue

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You must locally define the topic at router2 in order to bind it to a composite queue. Althought topics are automatically created when the first access takes place, they are undefined when there was no access when the composite queue is created (e.g. on startup). So just create it at router2 and then you can bind it to a composite queue all the time.

Re: cannot use remote topic in composite-queue

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I forgot: There is no thing such as "remote topic" because a topic is location independent. Messages are distributed on base of subscriptions which can be at the local or remote routers. So if you bind a topic to a composite queue it is like you publish the message to the local topic manager which distributes it to all subscriptions (local & remote).

Re: cannot use remote topic in composite-queue

by Eric Yung :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

In this case if I would like to bind the topic 't_1' defined in router1 to the composite queue defined in router2, could I use static-remote-router-subscription to include the topic 't_1' in router2?

e.g.

<static-remote-router-subscriptions>
  <static-remote-router-subscription name="router1">
    <static-topic-subscriptions>
      <static-topic-subscription name="t_1"/>
    </static-topic-subscriptions>
  </static-remote-router-subscription>
</static-remote-router-subscriptions>


Re: cannot use remote topic in composite-queue

by IIT Software :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Why do you want to do that? Here is a description on what a remote static subscription is for:

In a federated router network, subscriptions are exchanged dynamically between routers. If a router starts up, it has initially no knowledge about remote subscriptions. Once another router connects to this router, subscriptions are exchanged and messages are forwarded between the routers on base of these subscriptions. To enable message forwarding for times when a router has not yet remote subscriptions (it has just being started and no other router has connected yet), static remote subscriptions can be defined.

So all you need is to DEFINE the topic at router2:

 <topics>
      <topic name="t_1"/>
 </topics>

Then you can bind it to the comp queue at router2.