You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Jeremy Gooch <go...@yahoo.co.uk.INVALID> on 2017/02/21 17:24:58 UTC
Connecting to durable consumer - Qpid Electron Golang.
Hi,
Last week, I asked a question about implementing durable consumers in Python, via Proton. That's working perfectly now but I also need to support consumers written in Go, for which we're trying to use Electron. This time, it's not a missing container ID that's causing me a headache but a missing subscription name.
I thought that the subscription name should be passed into the Receiver via a LinkName, but the following code doesn't set the subscription name (the Receiver gets messages fine but any messages sent when off-line are lost).
if r, err := c.Receiver(electron.Source("topic://"+TopicName), electron.LinkName(SubscriptionName)); err == nil {
Should I be setting the subscription name somewhere else?
For info, I'm setting the container ID at instantiation time, via the NewContainer function. I'm running a fresh build of Electron, inside Docker, and using Go 1.7.
A working example for durable Go subscribers would be marvellous.
Thanks,
J.
Jeremy Gooch http://goochgooch.co.uk
Re: Connecting to durable consumer - Qpid Electron Golang.
Posted by Gordon Sim <gs...@redhat.com>.
On 21/02/17 20:23, Alan Conway wrote:
> On Tue, 2017-02-21 at 17:24 +0000, Jeremy Gooch wrote:
>> Hi,
>> Last week, I asked a question about implementing durable consumers in
>> Python, via Proton. That's working perfectly now but I also need to
>> support consumers written in Go, for which we're trying to use
>> Electron. This time, it's not a missing container ID that's causing
>> me a headache but a missing subscription name.
>> I thought that the subscription name should be passed into the
>> Receiver via a LinkName, but the following code doesn't set the
>> subscription name (the Receiver gets messages fine but any messages
>> sent when off-line are lost).
>>
>> if r, err := c.Receiver(electron.Source("topic://"+TopicName),
>> electron.LinkName(SubscriptionName)); err == nil {
>>
>> Should I be setting the subscription name somewhere else?
>> For info, I'm setting the container ID at instantiation time, via the
>> NewContainer function. I'm running a fresh build of Electron, inside
>> Docker, and using Go 1.7.
>> A working example for durable Go subscribers would be marvellous.
>> Thanks,
>> J.
>> Jeremy Gooch http://goochgooch.co.uk
>
> I want to get you going with this - can you raise a proton JIRA for the
> go-binding component at https://issues.apache.org/jira/ and include the
> following:
>
> - some info on the broker you are trying to subscribe to
> - your python example code
>
> I'm not very familiar with durable subscriptions (yet) but if I can
> look at what your python client is doing it should be easy to figure
> out what the equivalent thing would be in Go.
The source should have durability set to 2 (unsettled-state from
terminus-durability) and expiry-policy to 'never'.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Connecting to durable consumer - Qpid Electron Golang.
Posted by Jeremy Gooch <go...@yahoo.co.uk.INVALID>.
Hi Alan,
Thanks for the reply. I've created a JIRA ticket as requested.
https://issues.apache.org/jira/browse/PROTON-1415
J.
Jeremy Gooch http://goochgooch.co.uk
From: Alan Conway <ac...@redhat.com>
To: Jeremy Gooch <go...@yahoo.co.uk>; "users@qpid.apache.org" <us...@qpid.apache.org>
Sent: Tuesday, 21 February 2017, 20:23
Subject: Re: Connecting to durable consumer - Qpid Electron Golang.
On Tue, 2017-02-21 at 17:24 +0000, Jeremy Gooch wrote:
> Hi,
> Last week, I asked a question about implementing durable consumers in
> Python, via Proton. That's working perfectly now but I also need to
> support consumers written in Go, for which we're trying to use
> Electron. This time, it's not a missing container ID that's causing
> me a headache but a missing subscription name.
> I thought that the subscription name should be passed into the
> Receiver via a LinkName, but the following code doesn't set the
> subscription name (the Receiver gets messages fine but any messages
> sent when off-line are lost).
>
> if r, err := c.Receiver(electron.Source("topic://"+TopicName),
> electron.LinkName(SubscriptionName)); err == nil {
>
> Should I be setting the subscription name somewhere else?
> For info, I'm setting the container ID at instantiation time, via the
> NewContainer function. I'm running a fresh build of Electron, inside
> Docker, and using Go 1.7.
> A working example for durable Go subscribers would be marvellous.
> Thanks,
> J.
> Jeremy Gooch http://goochgooch.co.uk
I want to get you going with this - can you raise a proton JIRA for the
go-binding component at https://issues.apache.org/jira/ and include the
following:
- some info on the broker you are trying to subscribe to
- your python example code
I'm not very familiar with durable subscriptions (yet) but if I can
look at what your python client is doing it should be easy to figure
out what the equivalent thing would be in Go.
Cheers
Alan.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org
Re: Connecting to durable consumer - Qpid Electron Golang.
Posted by Alan Conway <ac...@redhat.com>.
On Tue, 2017-02-21 at 17:24 +0000, Jeremy Gooch wrote:
> Hi,
> Last week, I asked a question about implementing durable consumers in
> Python, via Proton. �That's working perfectly now but I also need to
> support consumers written in Go, for which we're trying to use
> Electron. �This time, it's not a missing container ID that's causing
> me a headache but a missing subscription name.
> I thought that the subscription name should be passed into the
> Receiver via a LinkName, but the following code doesn't set the
> subscription name (the Receiver gets messages fine but any messages
> sent when off-line are lost).
>
> �if r, err := c.Receiver(electron.Source("topic://"+TopicName),
> electron.LinkName(SubscriptionName)); err == nil {
>
> Should I be setting the subscription name somewhere else?
> For info, I'm setting the container ID at instantiation time, via the
> NewContainer function. I'm running a fresh build of Electron, inside
> Docker, and using Go 1.7.
> A working example for durable Go subscribers would be marvellous.
> Thanks,
> J.�
> Jeremy Gooch http://goochgooch.co.uk
I want to get you going with this - can you raise a proton JIRA for the
go-binding component at�https://issues.apache.org/jira/ and include the
following:
- some info on the broker you are trying to subscribe to
- your python example code
I'm not very familiar with durable subscriptions (yet) but if I can
look at what your python client is doing it should be easy to figure
out what the equivalent thing would be in Go.
Cheers
Alan.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org