Masstransit.Host: consumer does not mark the message ack

171 views
Skip to first unread message

Kiran

unread,
Jun 7, 2016, 5:05:59 PM6/7/16
to masstransit-discuss
I switch to using Masstransit.Host and the after the consumer processes the request and return the response the message in the queue is not acknowledged. Any thought on what might be wrong ?



in consumer class 

public async Task Consume(ConsumeContext<ISubmitNewOrderRequest> context)
        {
            SubmitNewOrderResponse response = new SubmitNewOrderResponse() { Status = "Successful", Orders = context.Message.Orders };
            
            do something...

            context.Respond<ISubmitNewOrderResponse>(response);
        }




    public class MgtService : IServiceSpecification 
    {
        public void Configure(IServiceConfigurator configurator)
        {
            configurator.UseRetry(Retry.None);
            
        }
        
    }



public class MgtServiceEndPoint : IEndpointSpecification
{
    readonly IConsumerFactory<ManagementConsumer> _consumerFactory;

    string _queueName = "";

    
    public MgtServiceEndPoint(IConsumerFactory<ManagementConsumer> consumerFactory)
    {
        _consumerFactory = consumerFactory;
        _queueName = Helper.GetAppSettingString("NewOrderQueue");
    }


    public int ConsumerLimit => Environment.ProcessorCount;
    public string QueueName
    {
        get { return _queueName; }
    }
    public void Configure(IReceiveEndpointConfigurator configurator)
    {

        configurator.Consumer(_consumerFactory);
    }
}

Kiran

unread,
Jun 10, 2016, 2:18:43 PM6/10/16
to masstransit-discuss
Any thoughts on this? the consumers keeps on processing the same message again and again

Chris Patterson

unread,
Jun 10, 2016, 3:04:40 PM6/10/16
to masstrans...@googlegroups.com
You should look at the logs and see what exception is being thrown. There is clearly something wrong with how the messages are being processed. Probably a dependency issue on the consumer. 

__
Chris Patterson




On Fri, Jun 10, 2016 at 11:18 AM -0700, "Kiran" <kiran....@gmail.com> wrote:

Any thoughts on this? the consumers keeps on processing the same message again and again

--
You received this message because you are subscribed to the Google Groups "masstransit-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to masstransit-dis...@googlegroups.com.
To post to this group, send email to masstrans...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/masstransit-discuss/b3e49c1a-1573-4a02-98d2-79c6bfbdc228%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

Kiran

unread,
Jun 13, 2016, 5:24:34 PM6/13/16
to masstransit-discuss

Figured out the issue. We recently created a new alias for rabbitmq server instead of using the servername (appQAServer). During deployment we did not update the service config to use the alias. So the client had appRabbitmqqa and the consumer had appQAServer, The consumer couldn't find the endpoint with appQAServer and so kept on processing the message again and again since the first request failed.  
Reply all
Reply to author
Forward
0 new messages