You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Palm Kevin (JIRA)" <ji...@apache.org> on 2009/11/24 17:15:52 UTC

[jira] Created: (AMQNET-213) selector not working anymore

selector not working anymore
----------------------------

                 Key: AMQNET-213
                 URL: https://issues.apache.org/activemq/browse/AMQNET-213
             Project: ActiveMQ .Net
          Issue Type: Bug
          Components: ActiveMQ
    Affects Versions: 1.2.0
            Reporter: Palm Kevin
            Assignee: Jim Gomes


When I try to commit a message (which connection and session already has been closed), then previously I executed this code:
{quote}
    Public Sub Commit(ByVal message As IMessage)
            Using connection As IConnection = Me.CreateIncomingConnection()
                Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
                    Dim consumer = session.CreateConsumer(message.NMSDestination, "NMSMessageID='" + message.NMSMessageId + "'")
                    Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(100))
                    If fetchedMessage Is Nothing Then _
                        Throw New Exception("Unable to commit message: cannot find message with id '" + message.NMSMessageId + "'")
                    consumer.Close()
                End Using
            End Using
    End Sub
{quote}
This code is *working with release 1.1.0*. but it *doens't work with Trunk*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-213) selector not working anymore

Posted by "Palm Kevin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56095#action_56095 ] 

Palm Kevin commented on AMQNET-213:
-----------------------------------

The problem seems even be more basic: Message receiption from queue not working any more:
{quote}
Public Sub ProduceConsumeMessageTest()
        Using connection As IConnection = New ActiveMQ.ConnectionFactory("tcp:\\localhost:61616").CreateConnection()
            Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
                ' Delete queue in order to ensure it is empty
                session.DeleteDestination(session.GetQueue("TestQueue"))

                Dim prod As IMessageProducer = session.CreateProducer(session.GetQueue("TestQueue"))
                Dim msg As ITextMessage = prod.CreateTextMessage()
                msg.Text = "abc"
                prod.Send(msg, MsgDeliveryMode.Persistent, MsgPriority.Normal, TimeSpan.MinValue)
                prod.Close()

                Dim consumer = session.CreateConsumer(session.GetQueue("TestQueue"))
                Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(10000))
                Assert.IsNotNull(fetchedMessage)
                Assert.AreEqual("abc", CType(fetchedMessage, ITextMessage).Text)
                consumer.Close()
            End Using
        End Using
    End Sub
{quote}
I never get the fetched message !?
(I just executed exactly the same test with NMS 1.1.0 and it works... but not with Trunk)

> selector not working anymore
> ----------------------------
>
>                 Key: AMQNET-213
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-213
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.2.0
>            Reporter: Palm Kevin
>            Assignee: Jim Gomes
>
> When I try to commit a message (which connection and session already has been closed), then previously I executed this code:
> {quote}
>     Public Sub Commit(ByVal message As IMessage)
>             Using connection As IConnection = Me.CreateIncomingConnection()
>                 Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
>                     Dim consumer = session.CreateConsumer(message.NMSDestination, "NMSMessageID='" + message.NMSMessageId + "'")
>                     Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(100))
>                     If fetchedMessage Is Nothing Then _
>                         Throw New Exception("Unable to commit message: cannot find message with id '" + message.NMSMessageId + "'")
>                     consumer.Close()
>                 End Using
>             End Using
>     End Sub
> {quote}
> Now, my code always throws the exception because the searched message cannot be found!
> This code is *working with release 1.1.0*. but it *doens't work with Trunk*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-213) selector not working anymore

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56096#action_56096 ] 

Timothy Bish commented on AMQNET-213:
-------------------------------------

It doesn't look like you are calling connection.Start()

> selector not working anymore
> ----------------------------
>
>                 Key: AMQNET-213
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-213
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.2.0
>            Reporter: Palm Kevin
>            Assignee: Jim Gomes
>
> When I try to commit a message (which connection and session already has been closed), then previously I executed this code:
> {quote}
>     Public Sub Commit(ByVal message As IMessage)
>             Using connection As IConnection = Me.CreateIncomingConnection()
>                 Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
>                     Dim consumer = session.CreateConsumer(message.NMSDestination, "NMSMessageID='" + message.NMSMessageId + "'")
>                     Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(100))
>                     If fetchedMessage Is Nothing Then _
>                         Throw New Exception("Unable to commit message: cannot find message with id '" + message.NMSMessageId + "'")
>                     consumer.Close()
>                 End Using
>             End Using
>     End Sub
> {quote}
> Now, my code always throws the exception because the searched message cannot be found!
> This code is *working with release 1.1.0*. but it *doens't work with Trunk*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (AMQNET-213) selector not working anymore

Posted by "Palm Kevin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Palm Kevin closed AMQNET-213.
-----------------------------

    Resolution: Won't Fix

No fix needed... connection.Start() was missing

> selector not working anymore
> ----------------------------
>
>                 Key: AMQNET-213
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-213
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.2.0
>            Reporter: Palm Kevin
>            Assignee: Jim Gomes
>
> When I try to commit a message (which connection and session already has been closed), then previously I executed this code:
> {quote}
>     Public Sub Commit(ByVal message As IMessage)
>             Using connection As IConnection = Me.CreateIncomingConnection()
>                 Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
>                     Dim consumer = session.CreateConsumer(message.NMSDestination, "NMSMessageID='" + message.NMSMessageId + "'")
>                     Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(100))
>                     If fetchedMessage Is Nothing Then _
>                         Throw New Exception("Unable to commit message: cannot find message with id '" + message.NMSMessageId + "'")
>                     consumer.Close()
>                 End Using
>             End Using
>     End Sub
> {quote}
> Now, my code always throws the exception because the searched message cannot be found!
> This code is *working with release 1.1.0*. but it *doens't work with Trunk*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-213) selector not working anymore

Posted by "Jim Gomes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56104#action_56104 ] 

Jim Gomes commented on AMQNET-213:
----------------------------------

This new behavior of needing to call connection.Start() caused me some trouble, too.  I spent about a day or so tracking down what was wrong.  Code that was working, suddenly stopped working.  I think we need to clearly call out this behavior in the release notes for 1.2.0.

> selector not working anymore
> ----------------------------
>
>                 Key: AMQNET-213
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-213
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.2.0
>            Reporter: Palm Kevin
>            Assignee: Jim Gomes
>
> When I try to commit a message (which connection and session already has been closed), then previously I executed this code:
> {quote}
>     Public Sub Commit(ByVal message As IMessage)
>             Using connection As IConnection = Me.CreateIncomingConnection()
>                 Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
>                     Dim consumer = session.CreateConsumer(message.NMSDestination, "NMSMessageID='" + message.NMSMessageId + "'")
>                     Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(100))
>                     If fetchedMessage Is Nothing Then _
>                         Throw New Exception("Unable to commit message: cannot find message with id '" + message.NMSMessageId + "'")
>                     consumer.Close()
>                 End Using
>             End Using
>     End Sub
> {quote}
> Now, my code always throws the exception because the searched message cannot be found!
> This code is *working with release 1.1.0*. but it *doens't work with Trunk*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-213) selector not working anymore

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56093#action_56093 ] 

Timothy Bish commented on AMQNET-213:
-------------------------------------

I'm not quite clear on the problem, could you provide a short but complete code sample that demonstrates your issue.

> selector not working anymore
> ----------------------------
>
>                 Key: AMQNET-213
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-213
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.2.0
>            Reporter: Palm Kevin
>            Assignee: Jim Gomes
>
> When I try to commit a message (which connection and session already has been closed), then previously I executed this code:
> {quote}
>     Public Sub Commit(ByVal message As IMessage)
>             Using connection As IConnection = Me.CreateIncomingConnection()
>                 Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
>                     Dim consumer = session.CreateConsumer(message.NMSDestination, "NMSMessageID='" + message.NMSMessageId + "'")
>                     Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(100))
>                     If fetchedMessage Is Nothing Then _
>                         Throw New Exception("Unable to commit message: cannot find message with id '" + message.NMSMessageId + "'")
>                     consumer.Close()
>                 End Using
>             End Using
>     End Sub
> {quote}
> Now, my code always throws the exception because the searched message cannot be found!
> This code is *working with release 1.1.0*. but it *doens't work with Trunk*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (AMQNET-213) selector not working anymore

Posted by "Palm Kevin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/AMQNET-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Palm Kevin updated AMQNET-213:
------------------------------

    Description: 
When I try to commit a message (which connection and session already has been closed), then previously I executed this code:
{quote}
    Public Sub Commit(ByVal message As IMessage)
            Using connection As IConnection = Me.CreateIncomingConnection()
                Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
                    Dim consumer = session.CreateConsumer(message.NMSDestination, "NMSMessageID='" + message.NMSMessageId + "'")
                    Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(100))
                    If fetchedMessage Is Nothing Then _
                        Throw New Exception("Unable to commit message: cannot find message with id '" + message.NMSMessageId + "'")
                    consumer.Close()
                End Using
            End Using
    End Sub
{quote}
Now, my code always throws the exception because the searched message cannot be found!
This code is *working with release 1.1.0*. but it *doens't work with Trunk*

  was:
When I try to commit a message (which connection and session already has been closed), then previously I executed this code:
{quote}
    Public Sub Commit(ByVal message As IMessage)
            Using connection As IConnection = Me.CreateIncomingConnection()
                Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
                    Dim consumer = session.CreateConsumer(message.NMSDestination, "NMSMessageID='" + message.NMSMessageId + "'")
                    Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(100))
                    If fetchedMessage Is Nothing Then _
                        Throw New Exception("Unable to commit message: cannot find message with id '" + message.NMSMessageId + "'")
                    consumer.Close()
                End Using
            End Using
    End Sub
{quote}
This code is *working with release 1.1.0*. but it *doens't work with Trunk*


> selector not working anymore
> ----------------------------
>
>                 Key: AMQNET-213
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-213
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.2.0
>            Reporter: Palm Kevin
>            Assignee: Jim Gomes
>
> When I try to commit a message (which connection and session already has been closed), then previously I executed this code:
> {quote}
>     Public Sub Commit(ByVal message As IMessage)
>             Using connection As IConnection = Me.CreateIncomingConnection()
>                 Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
>                     Dim consumer = session.CreateConsumer(message.NMSDestination, "NMSMessageID='" + message.NMSMessageId + "'")
>                     Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(100))
>                     If fetchedMessage Is Nothing Then _
>                         Throw New Exception("Unable to commit message: cannot find message with id '" + message.NMSMessageId + "'")
>                     consumer.Close()
>                 End Using
>             End Using
>     End Sub
> {quote}
> Now, my code always throws the exception because the searched message cannot be found!
> This code is *working with release 1.1.0*. but it *doens't work with Trunk*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-213) selector not working anymore

Posted by "Palm Kevin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56097#action_56097 ] 

Palm Kevin commented on AMQNET-213:
-----------------------------------

Ok. Now with call of connection.Start() and with filtering on JMSMessageId (instead of NMSMessageId) it is working. I will close this issue.

Notice anyway that a a read attempt on a closed connection should throw a ConnectionClosedException (or something similar) and not end in an timeout... (especially because the call Start() of start was not mandatory in 1.1.0)

> selector not working anymore
> ----------------------------
>
>                 Key: AMQNET-213
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-213
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.2.0
>            Reporter: Palm Kevin
>            Assignee: Jim Gomes
>
> When I try to commit a message (which connection and session already has been closed), then previously I executed this code:
> {quote}
>     Public Sub Commit(ByVal message As IMessage)
>             Using connection As IConnection = Me.CreateIncomingConnection()
>                 Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
>                     Dim consumer = session.CreateConsumer(message.NMSDestination, "NMSMessageID='" + message.NMSMessageId + "'")
>                     Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(100))
>                     If fetchedMessage Is Nothing Then _
>                         Throw New Exception("Unable to commit message: cannot find message with id '" + message.NMSMessageId + "'")
>                     consumer.Close()
>                 End Using
>             End Using
>     End Sub
> {quote}
> Now, my code always throws the exception because the searched message cannot be found!
> This code is *working with release 1.1.0*. but it *doens't work with Trunk*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AMQNET-213) selector not working anymore

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/AMQNET-213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56103#action_56103 ] 

Timothy Bish commented on AMQNET-213:
-------------------------------------

You can open a new issue for the ConnectionClosed exception and add a test case there for that issue.

The connection.Start() call should have been a requirement in 1.1.0 the fact that it wasn't was a bug.

> selector not working anymore
> ----------------------------
>
>                 Key: AMQNET-213
>                 URL: https://issues.apache.org/activemq/browse/AMQNET-213
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.2.0
>            Reporter: Palm Kevin
>            Assignee: Jim Gomes
>
> When I try to commit a message (which connection and session already has been closed), then previously I executed this code:
> {quote}
>     Public Sub Commit(ByVal message As IMessage)
>             Using connection As IConnection = Me.CreateIncomingConnection()
>                 Using session As ISession = connection.CreateSession(AcknowledgementMode.AutoAcknowledge)
>                     Dim consumer = session.CreateConsumer(message.NMSDestination, "NMSMessageID='" + message.NMSMessageId + "'")
>                     Dim fetchedMessage = consumer.Receive(TimeSpan.FromMilliseconds(100))
>                     If fetchedMessage Is Nothing Then _
>                         Throw New Exception("Unable to commit message: cannot find message with id '" + message.NMSMessageId + "'")
>                     consumer.Close()
>                 End Using
>             End Using
>     End Sub
> {quote}
> Now, my code always throws the exception because the searched message cannot be found!
> This code is *working with release 1.1.0*. but it *doens't work with Trunk*

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.