activemq-cpp: selector with UTF8 character

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

activemq-cpp: selector with UTF8 character

retep
This post has NOT been accepted by the mailing list yet.
Hello,

i try to create a durable consumer with a selector, that contains an UTF8 character like the geman ä.
When i do this, Session::createDurableConsumer never returns.

I'm using activemq-cpp 3.2.3 and activeMQ 5.3.2.

Here my example code:

int _tmain(int argc, _TCHAR* argv[])
{
   activemq::library::ActiveMQCPP::initializeLibrary();

   // Create a ConnectionFactory
   ConnectionFactory* connectionFactory =
      ConnectionFactory::createCMSConnectionFactory("tcp://myServer:61616?wireFormat=openwire&wireFormat.MaxInactivityDuration=120000");

   // Create a Connection
   Connection * connection = connectionFactory->createConnection("default", "", "myName");
   delete connectionFactory;
   //connection->setClientId(clientId);
   connection->start();

   // Create a Session
   Session * session = connection->createSession( Session::AUTO_ACKNOWLEDGE);

   Topic *t = session->createTopic( "myTopiyc" );
   MessageConsumer * consumer = session->createDurableConsumer( t, "TEXTMESSAGE", "UserName = 'German ä'");

        return 0;
}

When I kill the client, the server get an exception:

2010-11-18 09:46:51,843 | DEBUG | Transport failed: java.net.SocketException: Connection reset | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///172.25.8.148:60303
java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:168)
        at org.apache.activemq.transport.tcp.TcpBufferedInputStream.readStream(TcpBufferedInputStream.java:70)
        at org.apache.activemq.transport.tcp.TcpBufferedInputStream.read(TcpBufferedInputStream.java:92)
        at org.apache.activemq.transport.tcp.TcpTransport$2.read(TcpTransport.java:517)
        at java.io.DataInputStream.readFully(DataInputStream.java:178)
        at java.io.DataInputStream.readUTF(DataInputStream.java:592)
        at java.io.DataInputStream.readUTF(DataInputStream.java:547)
        at org.apache.activemq.openwire.v5.BaseDataStreamMarshaller.tightUnmarshalString(BaseDataStreamMarshaller.java:295)
        at org.apache.activemq.openwire.v5.ConsumerInfoMarshaller.tightUnmarshal(ConsumerInfoMarshaller.java:75)
        at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:362)
        at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:276)
        at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:211)
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:203)
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:186)
        at java.lang.Thread.run(Thread.java:619)


Best regards

pepe