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 <[email protected]> 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 <[email protected]
> >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 <[email protected]> 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 <[email protected]
> > > >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 <[email protected]>
> > 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 <[email protected]>
> > > wrote:
> > > > >
> > > > > > Thank you for your quick fix. I will test it later.
> > > > > >
> > > > > > Zhigang
> > > > > >
> > > > > >
> > > > > > On Wed, Jan 23, 2013 at 11:38 AM, Hiram Chirino <
> > > > [email protected]
> > > > > >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 <[email protected]
> >
> > > > wrote:
> > > > > >>
> > > > > >> > Here it is:
> > > > > >> >
> > > > > >> > #!/usr/bin/env python
> > > > > >> >
> > > > > >> >
> > > > > >> --
> > > > > >>
> > > > > >> **
> > > > > >>
> > > > > >> *Hiram Chirino*
> > > > > >>
> > > > > >> *Engineering | Red Hat, Inc.*
> > > > > >>
> > > > > >> *[email protected] <[email protected]> | 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.*
> > > >
> > > > *[email protected] <[email protected]> | 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.*
> >
> > *[email protected] <[email protected]> | 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.*

*[email protected] <[email protected]> | fusesource.com | redhat.com*

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

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

Reply via email to