[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-24 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15883540#comment-15883540
 ] 

ASF subversion and git services commented on PROTON-1415:
-

Commit fa677481c6a681004e5bdc2462e73876f9edf71d in qpid-proton's branch 
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=fa67748 ]

PROTON-1415: event.h move event aliases to connection_driver.h

Changed the event type aliases PN_TRANSPORT_READ/WRITE_CLOSED from static const
to #define, and moved them to connection_driver.h. The static const clutters the
ABI and the aliases are intended to match with connection_driver_t function
names so they belong in connection_driver.h.


> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
> Fix For: 0.18.0
>
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-24 Thread Andrew Stitcher (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15883493#comment-15883493
 ] 

Andrew Stitcher commented on PROTON-1415:
-

[~aconway] Note that changing the PN_TRANSPORT_READ_CLOSED & 
PN_TRANSPORT_WRITE_CLOSED definitions from enum values to static  constants is 
an ABI change and it also adds  2 (unecessary) ints to the ro data section.

So the new libqpid-proton etc. will no longer link with older executables if 
they used these constants.

It may be source API compatible, but I think that this part of the C API 
probably needs to be ABI compatible too.



> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
> Fix For: 0.18.0
>
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-24 Thread Jeremy Gooch (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15882553#comment-15882553
 ] 

Jeremy Gooch commented on PROTON-1415:
--

Looks good to me.  Many thanks for resolving this so quickly.

> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
> Fix For: 0.18.0
>
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15881497#comment-15881497
 ] 

ASF subversion and git services commented on PROTON-1415:
-

Commit 540e74e28266b1f914d1b3498168060264552d62 in qpid-proton's branch 
refs/heads/go1 from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=540e74e ]

PROTON-1415: event.h remove duplicate enums

event.h defines some "alias" enums, move these out of the enum declearation and
make them static const aliases instead. No effect on existing code but 
simplifies
code generation for Go binding.


> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15881499#comment-15881499
 ] 

ASF subversion and git services commented on PROTON-1415:
-

Commit c87b23ef7b473cd48e8775ed9c353d042d99f3ca in qpid-proton's branch 
refs/heads/go1 from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=c87b23e ]

PROTON-1415: go fix conversion of pn_seconds_t

genwrap.go: fix conversion of pn_seconds_t to time.Duration.
Exposed by adding TerminusSettings which includes a pn_seconds_t Timeout value.
This is the only place pn_seconds_t is used for a duration in proton instead of 
pn_millis_t.


> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15881498#comment-15881498
 ] 

ASF subversion and git services commented on PROTON-1415:
-

Commit 38592d1668eef9d192ed0c814b34e807039777d3 in qpid-proton's branch 
refs/heads/go1 from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=38592d1 ]

PROTON-1415: go binding does not create durable subscriber

Added `DurableSubscription(name string) LinkOption`, pass to 
Connection.Receiver()
to create a named durable subscription.


> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15881500#comment-15881500
 ] 

ASF subversion and git services commented on PROTON-1415:
-

Commit 569b4fca1ecf733bee925cd1abf33541456cf630 in qpid-proton's branch 
refs/heads/go1 from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=569b4fc ]

PROTON-1415: Merge branch 'master' into go1

Merge DurableSubscription changes.
Also merge restored compatibility back to proton-c 0.10


> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-23 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15881470#comment-15881470
 ] 

Alan Conway commented on PROTON-1415:
-

Thanks for the excellent feedback, all fixed now. Your example is working with 
two small changes.

1. DurableSubscription now takes the link name (aka subscription name), no need 
for separate LinkName() option. Durable subs are perhaps the only reason an 
application would care about link names, and "subscription name" will be more 
familiar to most users than "link name". LinkName() is still available for 
other obscure uses but not needed in this case.

2. The original receive.go example has the PID in the container-id as a crude 
form of uniqueness. For a durable subscription that's wrong, you need a stable 
container-id each time you run the client (e.g. your python example uses 
__file__ as container ID) I dropped that PID in more recent versions of the 
receive example because


Here are the changes:

{code}
modified   go-electron/receive.go
@@ -45,7 +45,8 @@ func main() {
var wait sync.WaitGroup // Used by main() to wait for all goroutines to 
end.
wait.Add(len(urls)) // Wait for one goroutine per URL.
 
-   container := electron.NewContainer(fmt.Sprintf("receive[%v]", 
os.Getpid()))
+   // NOTE: for durable subscriptions we must have a consistent 
container-id each time.
+   container := electron.NewContainer("receive")
connections := make(chan electron.Connection, len(urls)) // Connections 
to close on exit
 
// Start a goroutine to for each URL to receive messages and send them 
to the messages channel.
@@ -61,7 +62,9 @@ func main() {
connections <- c // Save connection so we can Close() 
when main() ends
debugf("Message source %s\n", *messageSource)
debugf("Subscription name %s\n", *subName)
-   r, err := c.Receiver(electron.LinkName(*subName), 
electron.Source(*messageSource), electron.DurableSubscription())
+   // NOTE: The DurableSubscription option sets the link 
name, aka subscription name.
+   // It does not need to be set separately with LinkName()
+   r, err := c.Receiver(electron.Source(*messageSource), 
electron.DurableSubscription(*subName))
fatalIf(err)
// Loop receiving messages and sending them to the 
main() goroutine
for {

{code}


> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15881467#comment-15881467
 ] 

ASF subversion and git services commented on PROTON-1415:
-

Commit c87b23ef7b473cd48e8775ed9c353d042d99f3ca in qpid-proton's branch 
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=c87b23e ]

PROTON-1415: go fix conversion of pn_seconds_t

genwrap.go: fix conversion of pn_seconds_t to time.Duration.
Exposed by adding TerminusSettings which includes a pn_seconds_t Timeout value.
This is the only place pn_seconds_t is used for a duration in proton instead of 
pn_millis_t.


> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15881466#comment-15881466
 ] 

ASF subversion and git services commented on PROTON-1415:
-

Commit 38592d1668eef9d192ed0c814b34e807039777d3 in qpid-proton's branch 
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=38592d1 ]

PROTON-1415: go binding does not create durable subscriber

Added `DurableSubscription(name string) LinkOption`, pass to 
Connection.Receiver()
to create a named durable subscription.


> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-23 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15881465#comment-15881465
 ] 

ASF subversion and git services commented on PROTON-1415:
-

Commit 540e74e28266b1f914d1b3498168060264552d62 in qpid-proton's branch 
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=540e74e ]

PROTON-1415: event.h remove duplicate enums

event.h defines some "alias" enums, move these out of the enum declearation and
make them static const aliases instead. No effect on existing code but 
simplifies
code generation for Go binding.


> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-23 Thread Jeremy Gooch (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15880801#comment-15880801
 ] 

Jeremy Gooch commented on PROTON-1415:
--

Currently getting the following error:-

{{./receive.go:64: undefined: electron.DurableSubscription}}

It doesn't seem to be declared in the Interface definition at line 29 of 
link.go (i.e. where LinkName and Source can be found).  Is this deliberate?
https://github.com/alanconway/qpid-proton/blob/go-durable-sub/proton-c/bindings/go/src/qpid.apache.org/electron/link.go#L29

I've updated the client code, to allow topic/queue and the subscription name to 
be passed in at runtime, in case that's useful for testing,
https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go

Calling syntax:-
{{go run receive.go -debug -count 10 -name fred -source topic://some_topic 
amqp://localhost:5672}}

> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-23 Thread Jeremy Gooch (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15880158#comment-15880158
 ] 

Jeremy Gooch commented on PROTON-1415:
--

Thanks for looking into this.

I found two problems:-

h2. 1. make failed

It complained about a lack of type on {{PN_TRANSPORT_READ_CLOSED}} in _event.h_.

I changed line 363 to read:-

{{static const pn_event_type_t PN_TRANSPORT_READ_CLOSED = 
PN_TRANSPORT_TAIL_CLOSED;}}

The project then built successfully (pull request = 
https://github.com/alanconway/qpid-proton/pull/1).

h2. 2. negative WaitGroup counter

Then, when I ran my _receive.go_ client, it failed with the following error:-

{code}
root@1919183e6e52:/usr/src/go-electron# go run receive.go
2017/02/23 09:00:37 Connecting to amqp://localhost:5672
Listening on 1 connections
panic: sync: negative WaitGroup counter

goroutine 5 [running]:
panic(0x5369c0, 0xc420092020)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
sync.(*WaitGroup).Add(0x844fa0, 0x)
/usr/local/go/src/sync/waitgroup.go:75 +0x1fe
sync.(*WaitGroup).Done(0x844fa0)
/usr/local/go/src/sync/waitgroup.go:100 +0x34
main.consume(0x570178, 0x15)
/usr/src/go-electron/receive.go:95 +0x530
created by main.main
/usr/src/go-electron/receive.go:47 +0x2cb
exit status 2
{code}

I haven't yet managed to solve this second one.  Sample code is in my repo - 
https://github.com/goochjs/amqp-activemq-python-go/tree/master/go-electron

> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (PROTON-1415) go binding does not create durable subscriber

2017-02-22 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/PROTON-1415?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15879380#comment-15879380
 ] 

Alan Conway commented on PROTON-1415:
-

Can you try the code at:
https://github.com/alanconway/qpid-proton/commit/e7d85c240c5eb4659ade6b0fb9cd7ed5f892ae74
If that solves the problem I'll commit it.


> go binding does not create durable subscriber
> -
>
> Key: PROTON-1415
> URL: https://issues.apache.org/jira/browse/PROTON-1415
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: go-binding
>Affects Versions: 0.17.0
> Environment: Docker for Windows 1.13.1
> Docker golang:1.7
> ActiveMQ 5.14.3 (Java 1.8.0_111)
>Reporter: Jeremy Gooch
>Assignee: Alan Conway
>
> When creating a subscription from Qpid Electron, the subscription name is not 
> set, meaning that durable subscriptions cannot be created.
> Example code -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/go-electron/receive.go
> Go example snippet (setting container ID):-
>   container = electron.NewContainer(fmt.Sprintf("receive-client[%v]", 
> os.Getpid()))
> Go example snippet (failing to set subscription name):-
>   if r, err := c.Receiver(electron.LinkName(SubscriptionName), 
> electron.Source("topic://"+AmqpResourceName)); err == nil {
> For comparison, I have a working Qpid Proton Python client, which sets both 
> connection ID and subscription name -> 
> https://github.com/goochjs/amqp-activemq-python-go/blob/master/python-proton/message_receiver.py
> Python example snippet (setting container ID):-
>   # Name the subscription after the script file name
> event.container.container_id = __file__
> Python example snippet (setting subscription name):-
> messaging_connection = event.container.connect(self.url)
> event.container.create_receiver(
> messaging_connection,
> self.resource,
> name=self.subscription_name,
> options=durable
> )



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org