You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Daniel Hutchison <da...@uvu.edu> on 2018/04/13 17:53:15 UTC

Getting 'java.lang.NumberFormatException: For input string: "1-1"' errors when doing client side ack with STOMP clients if message sent by AMQP producer

Hey all,

When my STOMP clients try to do client side ACKs on a message that was
sent from an AMQP producer, I'm getting the following error message
showing up in activemq's log (and my stomp clients get an error on
their connection as well):

2018-04-13 10:38:40,263 | WARN  | Transport Connection to: tcp://10.1.1.18:39522 failed: java.io.IOException: Unexpected error occurred: java.lang.NumberFormatException: For input string: "1-1" | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///10.1.1.18:39522@61613

I have been running activemq 5.10 with JMS java clients and producers.
 We have some programs written in PHP, Perl and Python that needed to
interact with the JMS messages.   So, I set them up using STOMP, and
everything has been running well for several years now (activemq seems
to be able to seamlessly transform the java text messages to stomp, and
I've been really happy with the system).

We recently had to integrate software that only supported sending AMQP
messages.   After integrating the AMQP producer, the messages sent from
it are not able to be ACKed by the STOMP clients (I tried all STOMP
clients I could, PHP, Python, and 2 different Perl modules).   All of
them reported the error when they tried to ACK the message.

I upgraded to activemq 5.15 to see if that would fix anything, but I'm
still getting the same error.   I am currently using
the transport.transformer=jms flag on my amqp transports (otherwise
the text body came with binary output in the stomp clients).   However,
I would get the java.lang.NumberFormatException with and with out the
transformer setting.

Here is what the activemq dashboard shows for the message causing the
error above:

    Headers
    ---------------
    Message ID:  ID:4ddb14b6-6f7a-4ba2-ad91-755b3010c5c1:1:1:1-1
    Destination: queue://IAM.box.membership
    Correlation: ID
    Group"
    Sequence:    0
    Expiration:  0
    Persistence: Persistent
    Priority:    4
    Redelivered: true
    Reply To:   
    Timestamp:   2018-04-12 16:47:01:133 MDT
    Type::
            
    Properties
    ---------------------
    JMS_AMQP_ORIGINAL_ENCODING:      5
    JMS_AMQP_MA_x-opt-jms-msg-type:  5
    JMSXDeliveryCount:               53
    JMS_AMQP_PROPERTIES:             true
    JMS_AMQP_HEADER:                 true
    JMS_AMQP_MA_x-opt-jms-dest:      0


The JMS clients don't have any problem acking the message on the client
side.  It is only the STOMP clients.   Since all STOMP clients I've
tested have the same issue, it seems like something inside activemq is
not working right.   The '1-1' that activemq is having problems with
seems to be part of the message ID that activemq has in its system. 

However, I'm not sure what I can do to work around the issue or try to
fix it.

Any insight would be much appreciated.

Thanks,

-daniel

Re: Getting 'java.lang.NumberFormatException: For input string: "1-1"' errors when doing client side ack with STOMP clients if message sent by AMQP producer

Posted by Daniel Hutchison <da...@uvu.edu>.
On Fri, 2018-04-13 at 14:04 -0400, Timothy Bish wrote:
> On 04/13/2018 01:53 PM, Daniel Hutchison wrote:
> > 
> > Hey all,
> > 
> > When my STOMP clients try to do client side ACKs on a message that
> > was
> > sent from an AMQP producer, I'm getting the following error message
> > showing up in activemq's log (and my stomp clients get an error on
> > their connection as well):
> > 
> > 2018-04-13 10:38:40,263 | WARN  | Transport Connection to:
> > tcp://10.1.1.18:39522 failed: java.io.IOException: Unexpected error
> > occurred: java.lang.NumberFormatException: For input string: "1-1"
> > | org.apache.activemq.broker.TransportConnection.Transport |
> > ActiveMQ Transport: tcp:///10.1.1.18:39522@61613
> > 
> This is a known issue on the 5.x broker
> https://issues.apache.org/jira/browse/AMQ-6386
> 
> I'd give Artemis a try to see if it can do that protocol crossing 
> without issues
> 
> 
Thanks for the quick response.   I have upgraded to the latest artemis,
and verified that I can do the cross protocol conversions without any
issue now. 
-daniel

Re: Getting 'java.lang.NumberFormatException: For input string: "1-1"' errors when doing client side ack with STOMP clients if message sent by AMQP producer

Posted by Timothy Bish <ta...@gmail.com>.
On 04/13/2018 01:53 PM, Daniel Hutchison wrote:
> Hey all,
>
> When my STOMP clients try to do client side ACKs on a message that was
> sent from an AMQP producer, I'm getting the following error message
> showing up in activemq's log (and my stomp clients get an error on
> their connection as well):
>
> 2018-04-13 10:38:40,263 | WARN  | Transport Connection to: tcp://10.1.1.18:39522 failed: java.io.IOException: Unexpected error occurred: java.lang.NumberFormatException: For input string: "1-1" | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///10.1.1.18:39522@61613
>
> I have been running activemq 5.10 with JMS java clients and producers.
>   We have some programs written in PHP, Perl and Python that needed to
> interact with the JMS messages.   So, I set them up using STOMP, and
> everything has been running well for several years now (activemq seems
> to be able to seamlessly transform the java text messages to stomp, and
> I've been really happy with the system).
>
> We recently had to integrate software that only supported sending AMQP
> messages.   After integrating the AMQP producer, the messages sent from
> it are not able to be ACKed by the STOMP clients (I tried all STOMP
> clients I could, PHP, Python, and 2 different Perl modules).   All of
> them reported the error when they tried to ACK the message.
>
> I upgraded to activemq 5.15 to see if that would fix anything, but I'm
> still getting the same error.   I am currently using
> the transport.transformer=jms flag on my amqp transports (otherwise
> the text body came with binary output in the stomp clients).   However,
> I would get the java.lang.NumberFormatException with and with out the
> transformer setting.
>
> Here is what the activemq dashboard shows for the message causing the
> error above:
>
>      Headers
>      ---------------
>      Message ID:  ID:4ddb14b6-6f7a-4ba2-ad91-755b3010c5c1:1:1:1-1
>      Destination: queue://IAM.box.membership
>      Correlation: ID
>      Group"
>      Sequence:    0
>      Expiration:  0
>      Persistence: Persistent
>      Priority:    4
>      Redelivered: true
>      Reply To:
>      Timestamp:   2018-04-12 16:47:01:133 MDT
>      Type::
>              
>      Properties
>      ---------------------
>      JMS_AMQP_ORIGINAL_ENCODING:      5
>      JMS_AMQP_MA_x-opt-jms-msg-type:  5
>      JMSXDeliveryCount:               53
>      JMS_AMQP_PROPERTIES:             true
>      JMS_AMQP_HEADER:                 true
>      JMS_AMQP_MA_x-opt-jms-dest:      0
>
>
> The JMS clients don't have any problem acking the message on the client
> side.  It is only the STOMP clients.   Since all STOMP clients I've
> tested have the same issue, it seems like something inside activemq is
> not working right.   The '1-1' that activemq is having problems with
> seems to be part of the message ID that activemq has in its system.
>
> However, I'm not sure what I can do to work around the issue or try to
> fix it.
>
> Any insight would be much appreciated.
>
> Thanks,
>
> -daniel
>

This is a known issue on the 5.x broker
https://issues.apache.org/jira/browse/AMQ-6386

I'd give Artemis a try to see if it can do that protocol crossing 
without issues


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