Pull message from a queue on an adhoc basis

smpapas
smpapas Member Posts: 19
edited October 2021 in General Discussions #1

Hi, I have a requirement to use spring cloud stream binder for solace to connect and pull messages from a queue. The application should not listen to that queue continuously instead it should try to pull the message based on a scheduled time interval. Could you pls help me how to achieve this with minimal java code?
Thanks

Comments

  • marc
    marc Member, Administrator, Moderator, Employee Posts: 914 admin

    Hi @smpapas,

    @UshShukla actually created a sample polling consumer using Spring Cloud Stream here. Can you take a look and see if that gives you what you're looking for?

    Hope that helps!

  • smpapas
    smpapas Member Posts: 19
    edited October 2021 #3

    The trigger is based on some business logic so I need to try it out and I will update soon