You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "McFarland, Mike" <mc...@metsci.com> on 2016/07/07 18:08:51 UTC

how to receive BytesMessages in python?

I've been using pyactivemq for years to send/receive TextMessage instances via ActiveMQ.

Now I'm looking to send & receive BytesMessage instances, but pyactivemq seems to have been abandoned before BytesMessages were fully supported.

I'm assuming Stomp can't receive a BytesMessage, right?  Are there any other python OpenWire bindings?

  -Mike


Re: how to receive BytesMessages in python?

Posted by Timothy Bish <ta...@gmail.com>.
On 07/07/2016 02:08 PM, McFarland, Mike wrote:
> I've been using pyactivemq for years to send/receive TextMessage instances via ActiveMQ.
>
> Now I'm looking to send & receive BytesMessage instances, but pyactivemq seems to have been abandoned before BytesMessages were fully supported.
>
> I'm assuming Stomp can't receive a BytesMessage, right?  Are there any other python OpenWire bindings?
>
>    -Mike
>
>
There aren't any other python bindings for OpenWire but you might want 
to look at AMQP python clients given that the latest 5.x brokers have 
strong AMQP support as well.  STOMP can do BytesMessage if that is an 
option, the broker treats any STOMP Message frame as a BytesMessage is 
the content-length header is set.

-- 
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


Re: how to receive BytesMessages in python?

Posted by Timothy Bish <ta...@gmail.com>.
On 07/08/2016 05:07 PM, Mike McFarland wrote:
> A java or OpenWire application can use methods like Message.setStringProperty() to attach metadata to a message:
>     http://docs.oracle.com/javaee/1.4/api/javax/jms/Message.html#setStringProperty(java.lang.String, java.lang.String)
>
> I'm curious if I'd be able to somehow access those properties from a python STOMP client.
>
>    -Mike

Message properties are always passed along when sent to a STOMP consumer 
in the MESSAGE frame's headers, your python client should have a way to 
access them.

Easiest thing to do is write some tests yourself and try it out.

>
>
> From: tabish121@gmail.com [via ActiveMQ] [mailto:ml-node+s2283324n4713768h91@n4.nabble.com]
> Sent: Thursday, July 07, 2016 5:24 PM
> To: McFarland, Mike
> Subject: Re: how to receive BytesMessages in python?
>
> On 07/07/2016 04:30 PM, Mike McFarland wrote:
>> Thanks for the pointers, Justin & Tim.
>>
>> Quick check - is there any way to access custom properties of a message when using Stomp?
>>
>>      -Mike
> Can you be more specific, STOMP message frames allow for headers, not
> sure what you are looking to do there.
>
>>
>>
>> From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4713768&i=0>]
>> Sent: Thursday, July 07, 2016 3:02 PM
>> To: McFarland, Mike
>> Subject: Re: how to receive BytesMessages in python?
>>
>> Both ActiveMQ 5.x and Artemis can do Stomp + BytesMessage. See their respective bits of documentation [1] [2] for more details.
>>
>>
>> Justin
>>
>> [1] http://activemq.apache.org/stomp.html
>> [2] https://activemq.apache.org/artemis/docs/1.3.0/protocols-interoperability.html
>>
>> ----- Original Message -----
>> From: "Mike McFarland" <[hidden email]</user/SendEmail.jtp?type=node&node=4713760&i=0>>
>> To: [hidden email]</user/SendEmail.jtp?type=node&node=4713760&i=1>
>> Sent: Thursday, July 7, 2016 1:08:51 PM
>> Subject: how to receive BytesMessages in python?
>>
>> I've been using pyactivemq for years to send/receive TextMessage instances via ActiveMQ.
>>
>> Now I'm looking to send & receive BytesMessage instances, but pyactivemq seems to have been abandoned before BytesMessages were fully supported.
>>
>> I'm assuming Stomp can't receive a BytesMessage, right?  Are there any other python OpenWire bindings?
>>
>>     -Mike
>>
>>
>> ________________________________
>> If you reply to this email, your message will be added to the discussion below:
>> http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713760.html
>> To start a new topic under ActiveMQ - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4713768&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4713768&i=2>>
>> To unsubscribe from ActiveMQ - User, click here<
>> NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>
>>
>>
>> ________________________________
>>
>> This email has been scanned for spam and viruses by Proofpoint Essentials. Click here<https://us1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=TMAoByVIPa7c&rid=54235715&report=1> to report this email as spam.
>>
>>
>>
>>
>>
>> --
>> View this message in context: http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713767.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
> --
> Tim Bish
> twitter: @tabish121
> blog: http://timbish.blogspot.com/
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713768.html
> To start a new topic under ActiveMQ - User, email ml-node+s2283324n2341805h38@n4.nabble.com
> To unsubscribe from ActiveMQ - User, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2341805&code=bWNmYXJsYW5kQG1ldHNjaS5jb218MjM0MTgwNXwzMzE1NzA3NzY=>.
> NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713795.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


-- 
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


RE: how to receive BytesMessages in python?

Posted by Mike McFarland <mc...@metsci.com>.
A java or OpenWire application can use methods like Message.setStringProperty() to attach metadata to a message:
   http://docs.oracle.com/javaee/1.4/api/javax/jms/Message.html#setStringProperty(java.lang.String, java.lang.String)

I'm curious if I'd be able to somehow access those properties from a python STOMP client.

  -Mike



From: tabish121@gmail.com [via ActiveMQ] [mailto:ml-node+s2283324n4713768h91@n4.nabble.com]
Sent: Thursday, July 07, 2016 5:24 PM
To: McFarland, Mike
Subject: Re: how to receive BytesMessages in python?

On 07/07/2016 04:30 PM, Mike McFarland wrote:
> Thanks for the pointers, Justin & Tim.
>
> Quick check - is there any way to access custom properties of a message when using Stomp?
>
>     -Mike

Can you be more specific, STOMP message frames allow for headers, not
sure what you are looking to do there.

>
>
>
> From: Justin Bertram-2 [via ActiveMQ] [mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4713768&i=0>]
> Sent: Thursday, July 07, 2016 3:02 PM
> To: McFarland, Mike
> Subject: Re: how to receive BytesMessages in python?
>
> Both ActiveMQ 5.x and Artemis can do Stomp + BytesMessage. See their respective bits of documentation [1] [2] for more details.
>
>
> Justin
>
> [1] http://activemq.apache.org/stomp.html
> [2] https://activemq.apache.org/artemis/docs/1.3.0/protocols-interoperability.html
>
> ----- Original Message -----
> From: "Mike McFarland" <[hidden email]</user/SendEmail.jtp?type=node&node=4713760&i=0>>
> To: [hidden email]</user/SendEmail.jtp?type=node&node=4713760&i=1>
> Sent: Thursday, July 7, 2016 1:08:51 PM
> Subject: how to receive BytesMessages in python?
>
> I've been using pyactivemq for years to send/receive TextMessage instances via ActiveMQ.
>
> Now I'm looking to send & receive BytesMessage instances, but pyactivemq seems to have been abandoned before BytesMessages were fully supported.
>
> I'm assuming Stomp can't receive a BytesMessage, right?  Are there any other python OpenWire bindings?
>
>    -Mike
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713760.html
> To start a new topic under ActiveMQ - User, email [hidden email]</user/SendEmail.jtp?type=node&node=4713768&i=1><mailto:[hidden email]</user/SendEmail.jtp?type=node&node=4713768&i=2>>
> To unsubscribe from ActiveMQ - User, click here<
> NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> ________________________________
>
> This email has been scanned for spam and viruses by Proofpoint Essentials. Click here<https://us1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=TMAoByVIPa7c&rid=54235715&report=1> to report this email as spam.
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713767.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


--
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713768.html
To start a new topic under ActiveMQ - User, email ml-node+s2283324n2341805h38@n4.nabble.com
To unsubscribe from ActiveMQ - User, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2341805&code=bWNmYXJsYW5kQG1ldHNjaS5jb218MjM0MTgwNXwzMzE1NzA3NzY=>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713795.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: how to receive BytesMessages in python?

Posted by Timothy Bish <ta...@gmail.com>.
On 07/07/2016 04:30 PM, Mike McFarland wrote:
> Thanks for the pointers, Justin & Tim.
>
> Quick check - is there any way to access custom properties of a message when using Stomp?
>
>     -Mike

Can you be more specific, STOMP message frames allow for headers, not 
sure what you are looking to do there.

>
>
>
> From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4713760h43@n4.nabble.com]
> Sent: Thursday, July 07, 2016 3:02 PM
> To: McFarland, Mike
> Subject: Re: how to receive BytesMessages in python?
>
> Both ActiveMQ 5.x and Artemis can do Stomp + BytesMessage. See their respective bits of documentation [1] [2] for more details.
>
>
> Justin
>
> [1] http://activemq.apache.org/stomp.html
> [2] https://activemq.apache.org/artemis/docs/1.3.0/protocols-interoperability.html
>
> ----- Original Message -----
> From: "Mike McFarland" <[hidden email]</user/SendEmail.jtp?type=node&node=4713760&i=0>>
> To: [hidden email]</user/SendEmail.jtp?type=node&node=4713760&i=1>
> Sent: Thursday, July 7, 2016 1:08:51 PM
> Subject: how to receive BytesMessages in python?
>
> I've been using pyactivemq for years to send/receive TextMessage instances via ActiveMQ.
>
> Now I'm looking to send & receive BytesMessage instances, but pyactivemq seems to have been abandoned before BytesMessages were fully supported.
>
> I'm assuming Stomp can't receive a BytesMessage, right?  Are there any other python OpenWire bindings?
>
>    -Mike
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713760.html
> To start a new topic under ActiveMQ - User, email ml-node+s2283324n2341805h38@n4.nabble.com<ma...@n4.nabble.com>
> To unsubscribe from ActiveMQ - User, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2341805&code=bWNmYXJsYW5kQG1ldHNjaS5jb218MjM0MTgwNXwzMzE1NzA3NzY=>.
> NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
>
>
>
> ________________________________
>
> This email has been scanned for spam and viruses by Proofpoint Essentials. Click here<https://us1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=TMAoByVIPa7c&rid=54235715&report=1> to report this email as spam.
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713767.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.


-- 
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


RE: how to receive BytesMessages in python?

Posted by Mike McFarland <mc...@metsci.com>.
Thanks for the pointers, Justin & Tim.

Quick check - is there any way to access custom properties of a message when using Stomp?

   -Mike



From: Justin Bertram-2 [via ActiveMQ] [mailto:ml-node+s2283324n4713760h43@n4.nabble.com]
Sent: Thursday, July 07, 2016 3:02 PM
To: McFarland, Mike
Subject: Re: how to receive BytesMessages in python?

Both ActiveMQ 5.x and Artemis can do Stomp + BytesMessage. See their respective bits of documentation [1] [2] for more details.


Justin

[1] http://activemq.apache.org/stomp.html
[2] https://activemq.apache.org/artemis/docs/1.3.0/protocols-interoperability.html

----- Original Message -----
From: "Mike McFarland" <[hidden email]</user/SendEmail.jtp?type=node&node=4713760&i=0>>
To: [hidden email]</user/SendEmail.jtp?type=node&node=4713760&i=1>
Sent: Thursday, July 7, 2016 1:08:51 PM
Subject: how to receive BytesMessages in python?

I've been using pyactivemq for years to send/receive TextMessage instances via ActiveMQ.

Now I'm looking to send & receive BytesMessage instances, but pyactivemq seems to have been abandoned before BytesMessages were fully supported.

I'm assuming Stomp can't receive a BytesMessage, right?  Are there any other python OpenWire bindings?

  -Mike


________________________________
If you reply to this email, your message will be added to the discussion below:
http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713760.html
To start a new topic under ActiveMQ - User, email ml-node+s2283324n2341805h38@n4.nabble.com<ma...@n4.nabble.com>
To unsubscribe from ActiveMQ - User, click here<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2341805&code=bWNmYXJsYW5kQG1ldHNjaS5jb218MjM0MTgwNXwzMzE1NzA3NzY=>.
NAML<http://activemq.2283324.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




________________________________

This email has been scanned for spam and viruses by Proofpoint Essentials. Click here<https://us1.proofpointessentials.com/index01.php?mod_id=11&mod_option=logitem&mail_id=TMAoByVIPa7c&rid=54235715&report=1> to report this email as spam.





--
View this message in context: http://activemq.2283324.n4.nabble.com/how-to-receive-BytesMessages-in-python-tp4713755p4713767.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: how to receive BytesMessages in python?

Posted by Justin Bertram <jb...@apache.com>.
Both ActiveMQ 5.x and Artemis can do Stomp + BytesMessage. See their respective bits of documentation [1] [2] for more details.


Justin

[1] http://activemq.apache.org/stomp.html
[2] https://activemq.apache.org/artemis/docs/1.3.0/protocols-interoperability.html

----- Original Message -----
From: "Mike McFarland" <mc...@metsci.com>
To: users@activemq.apache.org
Sent: Thursday, July 7, 2016 1:08:51 PM
Subject: how to receive BytesMessages in python?

I've been using pyactivemq for years to send/receive TextMessage instances via ActiveMQ.

Now I'm looking to send & receive BytesMessage instances, but pyactivemq seems to have been abandoned before BytesMessages were fully supported.

I'm assuming Stomp can't receive a BytesMessage, right?  Are there any other python OpenWire bindings?

  -Mike