activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hiram Chirino <hi...@hiramchirino.com>
Subject Re: AMQP connector warning
Date Fri, 25 Jan 2013 14:52:54 GMT
It's going to send to a queue named nothing, as in the empty string, aka "".
Which I think is a bad thing.  I'm going to update the code to also make
that be an error condition.


On Fri, Jan 25, 2013 at 9:45 AM, Zhigang Wang <w1z2g3@gmail.com> wrote:

> Then maybe this should be fixed in the proton-c library. I will take a look
> and talk to them. Anyway, this behavior to strange to end user.
>
> Also, if I use amqp://zhigang1/, which queue it sends to?
>
> Thanks,
>
> Zhigang
>
>
> On Fri, Jan 25, 2013 at 9:41 AM, Hiram Chirino <hiram@hiramchirino.com
> >wrote:
>
> > I think the difference is that your client is setting the address to null
> > in one case and in the other the address the empty string.  Should
> ActiveMQ
> > treat null address as empty string address.  Should empty string address
> > even be supported?  That basically creates a queue who's name is the
> empty
> > string.  Imagine the management nightmare of listing a queue who's name
> is
> > the empty string.
> >
> > I'm leaning towards treating the empty string address as a error too.
> >
> >
> > On Fri, Jan 25, 2013 at 9:36 AM, Zhigang Wang <w1z2g3@gmail.com> wrote:
> >
> > > Thanks for the tip.
> > >
> > > But see this test:
> > >
> > > [zhigang@zhigang proton]$ ./send.py -a amqp://zhigang1 hi
> > > ERROR amqp:connection:framing-error connection aborted
> > > [0x1141200:0] ERROR[-2] connection aborted
> > > CONNECTION ERROR connection aborted
> > > [zhigang@zhigang proton]$ ./send.py -a amqp://zhigang1/ hi
> > >
> > > It seems ActiveMQ currently can handle amqp://zhigang1/, but
> > > not amqp://zhigang1
> > >
> > > I think we should fix this.
> > >
> > > Thanks,
> > >
> > > Zhigang
> > >
> > >
> > > On Fri, Jan 25, 2013 at 9:15 AM, Hiram Chirino <hiram@hiramchirino.com
> > > >wrote:
> > >
> > > > That error occurred because the destination address was not set.  If
> > you
> > > > use a amqp url of
> > > > 'amqp://zhigang1/myqueue' then it should work.  I'll try to update
> the
> > > code
> > > > to handle this error condition more gracefully and provide a better
> > error
> > > > message.
> > > >
> > > >
> > > > On Fri, Jan 25, 2013 at 9:01 AM, Zhigang Wang <w1z2g3@gmail.com>
> > wrote:
> > > >
> > > > > Paste it again (send.py):
> > > > >
> > > > > Run it: ./send.py hi
> > > > >
> > > > >
> > > > > #!/usr/bin/env python
> > > > >
> > > > > import optparse
> > > > > import proton
> > > > > import sys
> > > > >
> > > > >
> > > > > def main():
> > > > >     parser = optparse.OptionParser('%prog [OPTS] MESSAGE')
> > > > >     parser.add_option('-a', '--address', default='amqp://zhigang1',
> > > > >                       help='adress:
> > > > > [amqp[s]://][user[:password]@]domain[/[name]]')
> > > > >     parser.add_option('-s', '--subject', default='foo.bar',
> > > > >                       help='subject')
> > > > >     opts, args = parser.parse_args()
> > > > >     if not args:
> > > > >         parser.print_help()
> > > > >         sys.exit(1)
> > > > >
> > > > >     messenger = proton.Messenger()
> > > > >     messenger.start()
> > > > >     msg = proton.Message()
> > > > >     msg.address = opts.address
> > > > >     msg.subject = opts.subject
> > > > >     content = ' '.join(args)
> > > > >     msg.body = unicode(content)
> > > > >     messenger.put(msg)
> > > > >     messenger.send()
> > > > >     messenger.stop()
> > > > >
> > > > >
> > > > > if __name__ == '__main__':
> > > > >     main()
> > > > >
> > > > >
> > > > > On Fri, Jan 25, 2013 at 8:10 AM, Hiram Chirino <
> > hiram@hiramchirino.com
> > > > > >wrote:
> > > > >
> > > > > > Hi Zhigang,
> > > > > >
> > > > > > Do you have the a script that can reproduce that error?
> > > > > >
> > > > > >
> > > > > > On Thu, Jan 24, 2013 at 4:18 PM, Zhigang Wang <w1z2g3@gmail.com>
> > > > wrote:
> > > > > >
> > > > > > > It seem worse now for today's snapshot:
> > > > > > >
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |
> > > > > > > org.apache.activemq.transport.amqp.AmqpProtocolException:
Could
> > not
> > > > > > process
> > > > > > > AMQP commands
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.activemq.transport.amqp.AmqpProtocolConverter.onFrame(AmqpProtocolConverter.java:245)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.activemq.transport.amqp.AmqpProtocolConverter.onAMQPData(AmqpProtocolConverter.java:151)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.activemq.transport.amqp.AmqpTransportFilter.onCommand(AmqpTransportFilter.java:94)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > >
> > > > >
> > >
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > > java.lang.Thread.run(Unknown Source)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 | Caused by:
> > > > > > > java.lang.NullPointerException
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.activemq.command.ActiveMQDestination.createDestination(ActiveMQDestination.java:93)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.activemq.transport.amqp.AmqpProtocolConverter.createDestination(AmqpProtocolConverter.java:636)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.activemq.transport.amqp.AmqpProtocolConverter.onReceiverOpen(AmqpProtocolConverter.java:601)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.activemq.transport.amqp.AmqpProtocolConverter.onLinkOpen(AmqpProtocolConverter.java:380)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       at
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.activemq.transport.amqp.AmqpProtocolConverter.onFrame(AmqpProtocolConverter.java:207)
> > > > > > > INFO   | jvm 1    | 2013/01/24 16:14:13 |       ... 6 more
> > > > > > >
> > > > > > > Please have a look.
> > > > > > >
> > > > > > > Thanks,
> > > > > > >
> > > > > > > Zhigang
> > > > > > >
> > > > > > >
> > > > > > > On Wed, Jan 23, 2013 at 12:40 PM, Zhigang Wang <
> w1z2g3@gmail.com
> > >
> > > > > wrote:
> > > > > > >
> > > > > > > > Thank you for your quick fix. I will test it later.
> > > > > > > >
> > > > > > > > Zhigang
> > > > > > > >
> > > > > > > >
> > > > > > > > On Wed, Jan 23, 2013 at 11:38 AM, Hiram Chirino <
> > > > > > hiram@hiramchirino.com
> > > > > > > >wrote:
> > > > > > > >
> > > > > > > >> Yep. your script looks good.  I found a problem
/w how the
> > AMQP
> > > > impl
> > > > > > was
> > > > > > > >> handling the socket disconnect.  I've now committed
a fix
> for
> > > > that.
> > > > > >  If
> > > > > > > >> you
> > > > > > > >> try a fresh build those messages should go away.
 Thanks for
> > the
> > > > > > report!
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> On Wed, Jan 23, 2013 at 9:21 AM, Zhigang Wang
<
> > w1z2g3@gmail.com
> > > >
> > > > > > wrote:
> > > > > > > >>
> > > > > > > >> > Here it is:
> > > > > > > >> >
> > > > > > > >> > #!/usr/bin/env python
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> --
> > > > > > > >>
> > > > > > > >> **
> > > > > > > >>
> > > > > > > >> *Hiram Chirino*
> > > > > > > >>
> > > > > > > >> *Engineering | Red Hat, Inc.*
> > > > > > > >>
> > > > > > > >> *hchirino@redhat.com <hchirino@redhat.com>
| fusesource.com|
> > > > > > > redhat.com*
> > > > > > > >>
> > > > > > > >> *skype: hiramchirino | twitter: @hiramchirino<
> > > > > > > >> http://twitter.com/hiramchirino>
> > > > > > > >> *
> > > > > > > >>
> > > > > > > >> *blog: Hiram Chirino's Bit Mojo <
> > http://hiramchirino.com/blog/
> > > >*
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > >
> > > > > > **
> > > > > >
> > > > > > *Hiram Chirino*
> > > > > >
> > > > > > *Engineering | Red Hat, Inc.*
> > > > > >
> > > > > > *hchirino@redhat.com <hchirino@redhat.com> | fusesource.com
|
> > > > redhat.com
> > > > > *
> > > > > >
> > > > > > *skype: hiramchirino | twitter: @hiramchirino<
> > > > > > http://twitter.com/hiramchirino>
> > > > > > *
> > > > > >
> > > > > > *blog: Hiram Chirino's Bit Mojo <http://hiramchirino.com/blog/>*
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > **
> > > >
> > > > *Hiram Chirino*
> > > >
> > > > *Engineering | Red Hat, Inc.*
> > > >
> > > > *hchirino@redhat.com <hchirino@redhat.com> | fusesource.com |
> > redhat.com
> > > *
> > > >
> > > > *skype: hiramchirino | twitter: @hiramchirino<
> > > > http://twitter.com/hiramchirino>
> > > > *
> > > >
> > > > *blog: Hiram Chirino's Bit Mojo <http://hiramchirino.com/blog/>*
> > > >
> > >
> >
> >
> >
> > --
> >
> > **
> >
> > *Hiram Chirino*
> >
> > *Engineering | Red Hat, Inc.*
> >
> > *hchirino@redhat.com <hchirino@redhat.com> | fusesource.com | redhat.com
> *
> >
> > *skype: hiramchirino | twitter: @hiramchirino<
> > http://twitter.com/hiramchirino>
> > *
> >
> > *blog: Hiram Chirino's Bit Mojo <http://hiramchirino.com/blog/>*
> >
>



-- 

**

*Hiram Chirino*

*Engineering | Red Hat, Inc.*

*hchirino@redhat.com <hchirino@redhat.com> | fusesource.com | redhat.com*

*skype: hiramchirino | twitter: @hiramchirino<http://twitter.com/hiramchirino>
*

*blog: Hiram Chirino's Bit Mojo <http://hiramchirino.com/blog/>*

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message