Thanks Michele, that works. Does this mean the disconnect method also cancels all subscriptions?
Steve --- Michele Laghi <[EMAIL PROTECTED]> wrote: > Hi Steve, > you need *not* to disconnect the subscriber, i.e. add to the command > line of the subscriber > > -disconnect false > > And then when you restart HelloWorldSubscribe you will get all updates. > Note that you will get them before you hit the key to subscribe (since > the subscription still exists). > > Michele > > > Steve Mentzer wrote: > > I've read prior posts about durable subscribers, but I just can't get > it > > to work the way I expect. I believe I should be able to have a client > > subscribe, then disconnect without unsubscribing. Then have another > > client publish messages that match the subscription, and finally have > the > > first client resubscribe and receive all the published messages. > > > > Here are the commands I'm using. Ignore wrapping, each command is on > a > > single line, and I execute them sequentially: > > > > // First subscribe but don't unsubscribe > > java javaclients.HelloWorldSubscribe > > -session.name joe/2 -dispatch/callback/retries -1 -multiSubscribe > false > > -unSubscribe false > > > > // Next, publish messages > > java javaclients.HelloWorldPublish -numPublish 10 > > > > // Finally, resubscribe to receive the published messages > > java javaclients.HelloWorldSubscribe > > -session.name joe/2 -dispatch/callback/retries -1 -multiSubscribe > false > > > > No messages are ever received by the last command. > > > > No doubt I'm doing something wrong, but I've tried a bunch of > variations > > and I've never been able to receive messages that were published while > the > > subscriber was disconnected. > > > > Steve > > > > > > > > > -- > Michele Laghi > mailto:[EMAIL PROTECTED] > tel. +46 8 7492952 / mob. +46 70 4103964 > http://eclettic.tripod.com > http://www.xmlBlaster.org
