Coder Social home page Coder Social logo

Comments (5)

christophd avatar christophd commented on May 27, 2024

Thank's a lot, I will have a look at this

from citrus.

stbutler11 avatar stbutler11 commented on May 27, 2024

I've seen the same thing with ActiveMQ

from citrus.

christophd avatar christophd commented on May 27, 2024

I will have to think about implementing explicit purge actions using the JMS message broker API instead of having a generic purge approach as before. Unfortunately purge operaitons in JMS message broker API are not standardized. Hm, that's a tough one I think. However thank you for pointing to this one again.

from citrus.

hmmlopez avatar hmmlopez commented on May 27, 2024

Hi @christophd

Why don't you just do as I propose above? Just removing the messageConsumer out of the do-while loop? That fixes this issue we had.

Before fix:

try {
    javax.jms.Message message;
    do {                
        messageConsumer = session.createConsumer(destination);
        message = (receiveTimeout >= 0) ? messageConsumer
                .receive(receiveTimeout) : messageConsumer.receive();

After fix:

try {
    javax.jms.Message message;
    messageConsumer = session.createConsumer(destination);
    do {                
        message = (receiveTimeout >= 0) ? messageConsumer
                .receive(receiveTimeout) : messageConsumer.receive();

It has almost no impact on the rest of the code and everything will work fine. It is not usual to create a new messageConsumer everytime you want to receive a message message from the same destination.

from citrus.

christophd avatar christophd commented on May 27, 2024

Hi Humphrey,

this issue has already been fixed in Citrus 1.2. I fixed the message consumer creation as you suggested. Sorry for not closing this issue on github accordingly.

Cheers,
Christoph

from citrus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.