# How to set DMQ Eligible flag in Spring Boot

**URL:** <https://community.solace.com/t/how-to-set-dmq-eligible-flag-in-spring-boot/1341>\
**Category:** General Discussions\
**Created:** [August 1, 2022, 3:03pm UTC](https://community.solace.com/t/how-to-set-dmq-eligible-flag-in-spring-boot/1341 "2022-08-01T15:03:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![testup](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@testup](https://community.solace.com/u/testup)\
**Post date:** [August 1, 2022, 3:03pm UTC](https://community.solace.com/t/how-to-set-dmq-eligible-flag-in-spring-boot/1341/1 "2022-08-01T15:03:09Z")

</div>

Hi there,  
i am using solace-jms-spring-boot-starter and jmstemplate in spring boot to send messages to queue. How can i set the DMQ Eligible flag over jmstemplate? Currently all my messages have the status DMQ Eligible NO.

> public void sendEvent() throws Exception {  
> String msg = “Hello World " + System.currentTimeMillis();  
> System.out.println(”==========SENDING MESSAGE========== " + msg);  
> jmsTemplate.setDeliveryMode(DeliveryMode.PERSISTENT);  
> jmsTemplate.convertAndSend(queueName, msg);  
> }

---

<div class="post-metadata">

**Author:** ![czajkowski](https://yyz1.discourse-cdn.com/solace/user_avatar/community.solace.com/czajkowski/32/1645_2.png) [@czajkowski](https://community.solace.com/u/czajkowski)\
**Post date:** [August 1, 2022, 3:38pm UTC](https://community.solace.com/t/how-to-set-dmq-eligible-flag-in-spring-boot/1341/2 "2022-08-01T15:38:01Z")

</div>

Hey there, thanks for posting and I hope we can help you. Please take a look at the following page and if you have any other questions please let us know. [Setting Message Properties](https://docs.solace.com/API/Solace-JMS-API/Setting-Message-Properties.htm#Dead) Thanks 🙂

---

<div class="post-metadata">

**Author:** ![testup](https://avatars.discourse-cdn.com/v4/letter/t/e9bcb4/32.png) [@testup](https://community.solace.com/u/testup)\
**Post date:** [August 2, 2022, 10:26am UTC](https://community.solace.com/t/how-to-set-dmq-eligible-flag-in-spring-boot/1341/3 "2022-08-02T10:26:11Z")

</div>

As i understood, i have to use SolAdmin in Spring Boot. But is there any other ways?

---

<div class="post-metadata">

**Author:** ![RobO](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@RobO](https://community.solace.com/u/RobO)\
**Post date:** [August 2, 2022, 2:10pm UTC](https://community.solace.com/t/how-to-set-dmq-eligible-flag-in-spring-boot/1341/4 "2022-08-02T14:10:56Z")

</div>

You should not have to use SolAdmin. Similar to what link was posted earlier, there is another link with available properties.  
[Message Properties](https://docs.solace.com/API/Solace-JMS-API/Message-Properties.htm)  
You can set all these properties via the JMS Template. The following is an example of how you could accomplish this.

jmsTemplate.convertAndSend(ORDER\_QUEUE, order, m → {  
m.setJMSCorrelationID(UUID.randomUUID().toString());  
m.setJMSExpiration( 1000 );  
m.setBooleanProperty(SupportedProperty.SOLACE\_JMS\_PROP\_ELIDING\_ELIGIBLE, true);  
return m;  
}
