activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <hi...@hiramchirino.com>
Subject Re: problem with byte selector
Date Fri, 19 May 2006 15:06:01 GMT
Hi Marcelo,

I've added a test case and fix to the latest source.  Please test
again agaist a subsequent snapshot.  Thanks for the report!

On 5/18/06, Datacom - Marcelo <marcelo@datacom-telematica.com.br> wrote:
> Hi I sent this message to dev-list but I saw it should be posted here
> before, I apologise to post it twice.
>
> W're using active-mq 4.0-rc2 and realize that any message sent are not
> received if we use a selector with a byte param. Here is the two
> programs used to show this behavior. If we change this param from byte
> to int it works. Is this a known bug ?
>
> Some parts are not shown to make this sample smaller.
>
> (MESSAGE SENDER)
>
> ......................
>    public static void main(String[] args) throws Exception {
>        TopicPublisher publisher =
> getSession().createPublisher(MessageClient.topic);
>
>        System.out.println("Started...");
>        Message msg = getSession().createMessage();
>        msg.setByteProperty("dummy", (byte) 33);
>        publisher.publish(msg);
>        System.out.println("Message sent.");
>        try {Thread.sleep(10000);} catch (Exception exc) {}
>        publisher.close();
>        session.close();
>        conn.close();
>        System.out.println("Finished.");
>    }
> (end)
>
>
> (MESSAGE RECEIVER)
>
> ......................
>
>   public static void main(String[] args) throws Exception {
>        JmsReceiverTest listen = new JmsReceiverTest();
>
>        System.out.println("Started...");
>        TopicSubscriber subscriber =
> getSession().createSubscriber(MessageClient.topic, "dummy = 33", false);
>        subscriber.setMessageListener(listen);
>        synchronized (listen) {
>            listen.wait(30000);
>        }
>        subscriber.close();
>        session.close();
>        conn.close();
>        System.out.println("Finished.");
>    }
>
>    public void onMessage(Message msg) {
>        System.out.println("Message received.");
>        try {
>            for (Enumeration e = msg.getPropertyNames();
> e.hasMoreElements();) {
>                String name = (String) e.nextElement();
>                System.out.println("Property name: " + name + ", value =
> " + msg.getObjectProperty(name));
>            }
>        } catch (Exception exc) {
>            exc.printStackTrace();
>        }
>        this.notify();
>    }
> (end)
>
> Thanks in advance,
>
> Marcelo Ribeiro
>


-- 
Regards,
Hiram

Mime
View raw message