Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-2425

AMQ 6.x with Oracle DB as persistence store: Messages for durable subsciber do not expire when there is no matching selector.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • JBoss A-MQ 6.3
    • broker
    • None
    • False
    • False
    • Undefined
    • Hide

      1) Connect and keep several subscribers connected to the same topic.
      2) Subscribers must have different values in the "selector" attribute.
      3) Send a message to the topic where the "selector" attribute does not match that of the subscribers.
      4) After waiting 40 minutes, the message still hasn't been deleted.
      5) Disconnect subscribers.
      6) The message is eliminated (When the value in the iteration of "priority" corresponds to that of the message, in our case "0").
       

      Show
      1) Connect and keep several subscribers connected to the same topic. 2) Subscribers must have different values in the "selector" attribute. 3) Send a message to the topic where the "selector" attribute does not match that of the subscribers. 4) After waiting 40 minutes, the message still hasn't been deleted. 5) Disconnect subscribers. 6) The message is eliminated (When the value in the iteration of "priority" corresponds to that of the message, in our case "0").  

      Logs: 

      A. # Subscriber Disconnected

       22:19:39,927 | DEBUG | ice[amq] Task-30 | ManagementContext | 219 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630475 | Unregistering MBean org.apache.activemq:type=Broker,brokerName=amq,de
      stinationType=Topic,destinationName=TestT,endpoint=Consumer,clientId=DurableSubscriberExample1,consumerId=Durable(DurableSubscriberExample1_subscriber2)
      22:19:39,927 | DEBUG | ice[amq] Task-30 | DurableTopicSubscription | 219 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630475 | Deactivating keepActive=true, DurableTopicSubscription-DurableSubscri
      berExample1:subscriber2, id=ID:cpandey.pnq.csb-36065-1609519504971-1:1:1:1, active=true, destinations=1, total=2, pending=2, dispatched=0, inflight=0, prefetchExtension=0
      22:19:39,928 | DEBUG | ice[amq] Task-30 | TransportConnection | 219 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630475 | Connection Stopped: tcp://127.0.0.1:52244
      22:19:40,475 | DEBUG | A Scheduled Task | LeaseDatabaseLocker | 219 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630475 | amq, lease keepAlive Query is UPDATE ACTIVEMQ_LOCK SET BROKER_NAME=?,
       TIME=? WHERE BROKER_NAME=? AND ID = 1
      22:19:40,490 | DEBUG | A Scheduled Task | LeaseDatabaseLocker | 219 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630475 | amq, lease keepAlive Query is UPDATE ACTIVEMQ_LOCK SET BROKER_NAME=?,
       TIME=? WHERE BROKER_NAME=? AND ID = 1

       

      B. Message Expiry only occurs after subscriber is disconnected. Topic name is topic://TestT. Here "expiration = 1609519575010" which is 22:16:15, message expiry should have happened that time. But it occurs only after removing subscriber.

        
      22:19:40,619 | DEBUG | ice[amq] Task-31 | RegionBroker | 219 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630475 | Message expired ActiveMQTextMessage {commandId = 7, responseRequired = true, messageId = ID:cpandey.pnq.csb-45891-1609517484457-1:1:1:1:3, originalDestination = null, originalTransactionId = null, producerId = ID:cpandey.pnq.csb-45891-1609517484457-1:1:1:1, destination = topic://TestT, transactionId = null, expiration = 1609519575010, timestamp = 1609519515010, arrival = 0, brokerInTime = 1609519515010, brokerOutTime = 0, correlationId = null, replyTo = null, persistent = true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = org.apache.activemq.util.ByteSequence@2c233cc7, marshalledProperties = org.apache.activemq.util.ByteSequence@22e4c733, dataStructure = null, redeliveryCounter = 0, size = 0, properties = {SYMBOL=value2}, readOnlyProperties = false, readOnlyBody = false, droppable = false, jmsXGroupFirstForConsumer = false, text = heyhey}

      C. Later after a while as per priority, message is actually deleted from Database table ACTIVEMQ_MSGS.

      22:23:01,833 | DEBUG | A Scheduled Task | JDBCPersistenceAdapter | 219 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630475 | Cleaning up old messages.
      22:23:01,834 | DEBUG | A Scheduled Task | DefaultJDBCAdapter | 219 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630475 | Executing SQL: DELETE FROM ACTIVEMQ_MSGS WHERE (PRIORITY=? AND ID <= 
       ( SELECT min(ACTIVEMQ_ACKS.LAST_ACKED_ID) FROM ACTIVEMQ_ACKS WHERE ACTIVEMQ_ACKS.CONTAINER=ACTIVEMQ_MSGS.CONTAINER AND ACTIVEMQ_ACKS.PRIORITY=?) )
      22:23:02,142 | DEBUG | A Scheduled Task | DefaultJDBCAdapter | 219 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630475 | Deleted 1 old message(s) at priority: 0
      22:23:02,142 | DEBUG | A Scheduled Task | JDBCPersistenceAdapter | 219 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-630475 | Cleanup done.
        

       

              gtully@redhat.com Gary Tully
              rhn-support-cpandey Chandra Shekhar Pandey (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: