Project

General

Profile

Image Support #3816

IPAM2: How to stop delivery of incoming JMS message to MDB

Added by Shweta 3 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Due date:
% Done:

0%

Operating System:
Linux
JRE:
Not Applicable
Instance Type:
Not Applicable
Your Marketplace Account ID:
2872-5568-4589
Marketplace:
Amazon Web Services
Customer State:
Sydney
Customer Country:
New South Wales

Description

Hi Team,

We have configured activations properties of MDB in a class itself as mentioned below. by default delivery-active was set as true.

Config properties of MDB:
@MessageDriven(name = "QueryIPAddressDetailsMDB", activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "${sessionDefaultType}"),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "Telstra.IPAM.QueryIPAddressDetails.Request"),
@ActivationConfigProperty(propertyName = "jndiParameters", propertyValue = "java.naming.security.principal=${tibco.user};java.naming.security.credentials=${tibco.password};java.naming.factory.initial=com.tibco.tibjms.naming.TibjmsInitialContextFactory;java.naming.provider.url=${providerUrl};com.tibco.tibjms.naming.security_protocol=ssl;com.tibco.tibjms.naming.ssl_enable_verify_host=${ssl_enable_verify_host};com.tibco.tibjms.naming.ssl_enable_verify_hostname=${ssl_enable_verify_hostname}"),
@ActivationConfigProperty(propertyName = "connectionFactory", propertyValue = "${connectionFactory}"),
@ActivationConfigProperty(propertyName = "user", propertyValue = "${tibco.user}"),
@ActivationConfigProperty(propertyName = "password", propertyValue = "${tibco.password}"),
@ActivationConfigProperty(propertyName = "maxSession", propertyValue = "${maxSession}"),
@ActivationConfigProperty(propertyName = "reconnectAttempts", propertyValue = "${reconnectAttempts}")})
@ResourceAdapter("genericjms-xa.rar")

We have 13 MDBs in our application code. As suggested in previous ticket #3799 , we have added annotation @DeliveryGroup("rpa-mdb-delivery-group") in the MDB class and delivery-group has been configured in standalone-full.xml and active set as false because we do not want MDBs to consume messages as soon as it activates.

Configuration in standalon-full.xml:
<delivery-groups>
<delivery-group name="rpa-mdb-delivery-group" active="false"/>
</delivery-groups>

I could see the delivery-active for this particular MDB as false in JBoss management console.

I required to start the delivery of this group so all the MDBs associated with this group will start consuming messages after running start-delivery command.

But I am not able to start the delivery for group. Getting below error:

[:443 /] cd subsystem=ejb3/mdb-delivery-group=rpa-mdb-delivery-group
[:443 mdb-delivery-group=rpa-mdb-delivery-group] :start-delivery {
"outcome" => "failed",
"failure-description" => "WFLYCTL0031: No operation named 'start-delivery' exists at address [
(\"subsystem\" => \"ejb3\"),
(\"mdb-delivery-group\" => \"rpa-mdb-delivery-group\")
]",
"rolled-back" => true
}

please let us know how to stop group of MDBs.

Thanks,
IPAM2

#1

Updated by Shweta 3 months ago

Also,
Is it a good practice to stop the delivery using CLI before deploying application or restarting the jboss ?

The issue we are getting in Production is , as soon as our application gets deployed , MDB connects and starts to consume messages before jboss loads other application properties files. so basically we are looking for a way to deploy the ear without affecting incoming messages in our queue.

Could you please provide the below information :

1. Considering scenario where there is load on server, continues JMS messages are coming through, Once the stop:delivery of MDB completed what will happen to messages which are still processing in MDB

Please let us know.

#2

Updated by Rafael 3 months ago

  • Status changed from New to In Progress
  • Assignee changed from Mariusz to Red Hat Support
  • Priority changed from High to Normal
#3

Updated by Rafael 3 months ago

Hi Shweta,

We have created a case with the Red Hat support team, I'll go back to you as soon as we have a response.

Best regards,

Rafa

#4

Updated by Rafael 3 months ago

  • Status changed from In Progress to Feedback
  • Assignee changed from Red Hat Support to Shweta

Hi Shweta,

Here's the answer from the Red Hat support team:

Hi,

Thanks for contacting Red Hat.

The way you are trying to start the delivery group is incorrect. You should try something like this1

/subsystem=ejb3/mdb-delivery-group=rpa-mdb-delivery-group:write-attribute(name=active,value=true)

And to stop it:

/subsystem=ejb3/mdb-delivery-group=rpa-mdb-delivery-group:write-attribute(name=active,value=false)

I'm not sure about the good practice. It doesn't really do any harm though so it depends on your use case. If you don't want the messages to start getting consumed as soon as the application is deployed, then you can use this. I've seen other customers using it.

It will not abort any running transactions when you issue a stop delivery command so it will finish what it's doing before stopping.

[1] https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/developing_ejb_applications/message_driven_beans-1#delivery_groups

Regards,
Avinash

Cheers!

Rafa

#5

Updated by Shweta 3 months ago

Thanks for your update. Below commands are working. As you said in the previous update stopping delivery will not abort any running transactions and it will finish the current on going requests. So would you please provide information regarding below:

1.What’s the difference between suspending the jboss server and stopping delivery-group to consume messages ?

2.Does suspending server suspends EJB subsystem also ? Does it allow delivery of new inbound JMS messages into MDBs ?

3.Is it a good practice to combine both approaches –

Step 1. Make the delivery-group INACTIVE using CLI using command = /subsystem=ejb3/mdb-delivery-group=rpa-mdb-delivery-group:write-attribute(name=active,value=false)

Step 2. Suspend the jboss server using command = :suspend(timeout=16)

Step 3. Deployment of new application ear

Step 4. Resume the server using command= :resume

Step 5. Make the delivery-group Back to ACTIVE

#6

Updated by Rafael 3 months ago

  • Assignee changed from Shweta to Red Hat Support
#7

Updated by Rafael 2 months ago

  • Assignee changed from Red Hat Support to Shweta

Hi Shweta,

Here's the answer from the Red Hat support team:

Hi,

Please find the answers:

1. Suspending the JBoss server will suspend the entire server where no new requests will be accepted1. Stopping the delivery group will just stop the mdb's in that delivery group from consuming the messages.

2. As I said, suspending the server will suspend everything (including EJBs). It will wait till the specified timeout for the existing requests to finish, and after that, no new request will be accepted in this state1.

3. If you are suspending the server then stopping the delivery group is redundant, just spending the server should do the job for you. Please test this scenario properly before executing this in production.

[1] https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.2/html/configuration_guide/starting_and_stopping_jboss_eap#suspend_servers

Regards,
Avinash

Cheers!

Rafa

#8

Updated by Rafael 2 months ago

  • Status changed from Feedback to Marked for Closure

Hi Shweta,

We noticed there hasn't been an update to this ticket for some time. Can we consider this ticket closed from support point of view? Is this still an issue or is there anything further that we can do for you in this regard? If not we will be timing out this ticket and will be closed in a few days time. If you have any other queries, please do not hesitate to ask us.

Cheers!

Rafa

#9

Updated by Rafael about 2 months ago

  • Status changed from Marked for Closure to Closed

Also available in: Atom PDF