by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 08 16:53
    Build #2902 passed
  • Aug 08 16:31
    Build #2901 passed
  • Aug 08 16:10
    Build #2900 passed
  • Aug 08 15:45
    Build #2899 passed
  • Aug 08 15:22
    Build #2898 passed
  • Aug 08 07:09
    Build #2897 passed
  • Aug 06 19:55
    Build #2896 passed
  • Aug 06 07:44
    Build #2895 passed
  • Aug 06 07:10
    Build #2894 passed
  • Aug 05 18:22
    Build #2893 passed
  • Aug 05 12:53
    Build #2892 passed
  • Aug 04 13:25
    Build #2891 passed
  • Aug 04 11:24
    Build #2890 passed
  • Jul 31 17:09
    Build #2889 passed
  • Jul 31 16:46
    Build #2888 passed
  • Jul 31 16:25
    Build #2887 passed
  • Jul 31 11:18
    Build #2886 passed
  • Jul 29 13:37
    Build #2885 passed
  • Jul 27 23:38
    Build #2884 passed
  • Jul 27 23:12
    Build #2883 passed
fujee
@fujee

Hi @phatboyg , I have already addressed you once due to problem with the request-response and sagas.
When the first time I started the services one of the messages was lost, each time it worked properly.
Then you found a bug and updated the version of mastransit.

Feb 24 03:05
@hsynls I just pushed the change to develop, once it builds I'll be releasing 6.2 (which has a bunch of updates, AND the fix for @fujee on threading

Now I have a simular problem.
I have multiple sagas that communicate with each other through commands and events.
The first time I start the services, one of the saga sends a event, but the other saga doesn't catch it, but every next time it works properly, no matter how many times I start the process again. So after all services restart and reconnect to rabbitmq it happens again, one event is not captured by one of the sagas. Also it is not the same type of event that is lost.
I tried again after recreating the virtual host (fresh exchanges and queues),
I also tried using "(context.CreateConsumeContext ()).Publish<IEvaluated>(new Evaluated())" instead of "sagaContext.Public(new Evaluated())" but I could not find the reason why the message failed to reach the second saga.
It's as if for some reason the first time some binding was not done and the message was lost, and every next time it works properly.
Have you encountered a case like this before and do you know what I could try?

Igor
@Perkovsky
Hi! Could you explain how to use queue priority with ActiveMQ?
Chris Patterson
@phatboyg
@Perkovsky when sending or publishing, you can set the priority using an extension method in the ActiveMqTransport code on SendContext.
endpoint.Send(message, context => context.TrySetPriority(priority))
Igor
@Perkovsky
@phatboyg Thank you for your answer. Do I need to configure ActiveMQ from MassTransit to use priority?
Igor
@Perkovsky
@phatboyg I configured ActiveMQ according to the documentation. I used this code endpoint.Send(message, context => context.TrySetPriority(MsgPriority.Lowest)), but I got the default priority = 4 in the queue for the sent message. What have I done wrong?
Chris Patterson
@phatboyg
Well, change it from TrySetPriority to SetPriority to make sure it's being set. Beyond that, I don't have any suggestions.
Igor
@Perkovsky
@phatboyg Thank you.
mdx0111
@mdx0111

I'm working on a project using a Micro Service Architecture. We expose all our API's using asp.net core 2. Internally we use MassTransit to communicate between all the micro services. We recently added asp.net core authentication + IdentityServer. This allows us to use oauth2 and Single Sign On.

But this requires that a security token / cookie / httpcontext be preserved in the inter-micro service communications.

What is the correct approach to this from a MassTransit point of view? At the simplest level, is just possible to preserve httpcontext headers (using GreenPipes?), or preserve the httpcontext in a more robust way? Or is there a more sophisticated approach to access control and sercurity in MT?

@michalsteyn Hi Michal,
Did you find any solution to your problem? I'm exactly in the same situation and I'm having difficulty in finding any solution to this problem. I wonder if you could share your experience please.

Maciek Misztal
@mmisztal1980
@phatboyg given I use ConfigureConsumer(IRegistration, Type) - is there any recommended way to set up the filters for my consumer when using this method?
Chris Patterson
@phatboyg
@mmisztal1980 you should create a definition for your consumer, that configures the middleware in the Configure method. Be sure that your definition is either registered with the consumer (during AddConsumer) or discovered from the assembly using AddConsumersFrom... https://masstransit-project.com/usage/containers/definitions.html
Maciek Misztal
@mmisztal1980
right, thanks :) I'm also looking at the Filters, I need to extract the correlation Id and attach it to a logging scope in Serilog, while the remainder of the processing pipeline executes. Should that be done in a Filter? (If so - how?) or should I use a IMessageAuditStore?
Maciek Misztal
@mmisztal1980
now that I think of it, I also need to decorate the ougoing messages' headers :/
Maciek Misztal
@mmisztal1980
Any suggestions @phatboyg ?
Chris Patterson
@phatboyg
Well, @mmisztal1980 you should join the Discord for one...
Logging seems like an observer, whereas changing headers seems like a filter.
Maciek Misztal
@mmisztal1980
oh, so gitter is being phased out in favour of discord?
Jussi Mattila
@jussimattila
I have request/response message flow. It appears that response objects are reused for multiple invocations. Is that correct? And is it by design? When I send a request and get back a response, then send another request, MassTransit reuses the previous response object. If I hold on to the previous message response, its content are "overwritten" by the latest response. My gut reaction is that this is wrong, MassTransit should create a new message response object for every request. Have I misunderstood something?
Jussi Mattila
@jussimattila
Nope, error on my end, there was a static field being reused! Responses are indeed created but the payload had a field that was backed by some static data.
Saeed Ganji
@shahabganji

Hi everyone, I am newbie to MassTransit, and I want to add OpenTelemetry with Zipkin to my projects, I handled the configurations for my API endpoint app, ASP.NET Core, but adding same configurations in my service workers, which my MT sagas and consumers reside, has no effect and does not provide any metric to Zipkin.

does anyone know how to configure that?

Chris Patterson
@phatboyg
Just a reminder, this room is infrequently monitored, community support is on Discord: https://discord.gg/rNpQgYn
aungkokoshein
@aungkokoshein
Hi everyone, I have the RabbitMQ cluster setup with multiple hosts. When the primary server is down (stopped RabbitMQ windows service), the bus is not starting and complaining about the broker unavailable. When I used the same cluster with Publish it is working fine. Can someone help?
Venkatesh Thatham
@thatham
Error: No service for type 'MassTransit.Scoping.ScopedConsumeContextProvider' has been registered.
var busFactory = Bus.Factory.CreateUsingRabbitMq(cfg =>
            {
                cfg.Message<AddNewUser>(options =>
                {
                    options.SetEntityName("registrations");
                });

                var host = cfg.Host("rabbimq://ocalhost:5672/", opt =>
                {
                    opt.Username("test");
                    opt.Password("test");
                });

                cfg.ReceiveEndpoint("user", ec =>
                {
                    ec.UseMessageRetry(r => r.Interval(settings.BusSettings.RetryLimit, TimeSpan.FromSeconds(5)));

                    ec.Consumer<AddNewUserHandler>(provider);
                    EndpointConvention.Map<AddNewUser>(new Uri("rabbimq://ocalhost:5672/user"));
                });
            });

            services.AddMassTransit(busBuilder => {
                busBuilder.AddConsumer(typeof(AddNewUserHandler));
                busBuilder.AddBus(provider => busFactory);
            });

            services.AddSingleton<IPublishEndpoint>(busFactory);
            services.AddSingleton<ISendEndpointProvider>(busFactory);
            services.AddSingleton<IBus>(busFactory);
Chris Patterson
@phatboyg
Just a reminder, this room is infrequently monitored, community support is on Discord: https://discord.gg/rNpQgYn
@thatham you need to follow the configuration for MS DI. The additional addSingleton afterwards need to be removed.
And you need to use ec.ConfigureConsumer<AddNewUserHandler>(context) when configuring the receive endpoint.
Also, you're likely on an older version of MT I'd suggest 6.3.2
Venkatesh Thatham
@thatham
@phatboyg Thank you for redirecting me to the proper support group. I'm using version 6.3.2 and as per your guidance, it's working... now. Thank you
Henk Olietenk
@holietenk
Hi, We are trying to use MassTransit with Service Bus and Durable Functions. So, when we receive a message from SB with our Azure Function (ServiceBusTrigger), we call messageReceiver.Handle<NameOfConsumer>("queue-name", message, ...). Now, the problem is that we don't find a way to pass the instance of IDurableOrchestrationClient to the consumer.
The code looks like this:
[FunctionName("Name-Of-Trigger")]
public async Task ExecuteTriggerAsync(
    [ServiceBusTrigger("name-of-queue")] Message message,
    [DurableClient] IDurableOrchestrationClient starter,
    ILogger logger)
{
    await _messageReceiver.HandleConsumer<SampleConsumer>("name-of-queue", message, CancellationToken.None).ConfigureAwait(false);
}
Chris Patterson
@phatboyg
@holietenk not sure if it works that you can put IDurableOrchestrationClient on the class as a dependency but you could try it. Since the consumer is resolved from the container, it may be within a scope and your consumer could take that same dependency.
Henk Olietenk
@holietenk

@phatboyg that would be too easy :)
The instance of IDurableOrchestrationClient is created by the Azure Functions runtime. It is how Functions work, since the method can be static. DI has been introduced fairly recently.

Is there a way in general to pass an object to HandleConsumer? Are there plans to do something like this?

(the combination of DI and non-static methods are fairly new for Azure Functions)
Chris Patterson
@phatboyg
There isn't anything currently planned in that regard.
Henk Olietenk
@holietenk
OK. Thanks, @phatboyg ;)
Rahul Gupta
@RahulG1509_twitter
@phatboyg In case of Courier framework, is there a way to host each of the activities separately as azure functions? As observed they all are hosted in the host which executes the routing slip. I am also not sure of the lifetime of each of the activities and the host. Do they all run till the Routing Slip is completed? The idea is to have them run when they are doing something to optimize on compute cost
Chris Patterson
@phatboyg
@RahulG1509_twitter that isn't something I've tried, so you'd be on your own.
veneMarcos
@veneMarcos
Hi everyone, I'm using the persistence saga with mongoDB, and apparently we only have the status persisted only after trying to send an event to some queue (rabbitmq). If the call to the queue fails, is this data not persisted for a retry?
Stephan van Rooij
@svrooij
Hi guys, I've just posted a question on StackOverflow and was wondering if someone could have a look https://stackoverflow.com/questions/62713786/masstransit-endpointconvention-azure-service-bus
Andrey Klochaniy
@Dessyk

Hi guys, what is the difference between

endpointConfigurator.Consumer<EventConsumer>(sp);

and

endpointConfigurator.Consumer<EventConsumer>();

where sp is ServiceProvider becuse when I use

endpointConfigurator.Consumer<EventConsumer>(sp);

I got

System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at MassTransit.Context.BaseConsumeContext.GenerateFault[T](ConsumeContext`1 context, Exception exception)
   at MassTransit.Context.BaseConsumeContext.NotifyFaulted[T](ConsumeContext`1 context, TimeSpan duration, String consumerType, Exception excepti
on)
   at MassTransit.Pipeline.Filters.ConsumerMessageFilter`2.GreenPipes.IFilter<MassTransit.ConsumeContext<TMessage>>.Send(ConsumeContext`1 context
, IPipe`1 next)

I use custom MessageDeserializer and DeserializerConsumeContext

Chris Patterson
@phatboyg
Just a reminder, this room is infrequently monitored, community support is on Discord: https://discord.gg/rNpQgYn
Riad Al-jomai
@aljomai
Hello, I am trying to publish events from Azure Functions Consumer but I am getting an error:
 Entity cannot have auto-forwarding policy to itself.
 [7/9/2020 4:15:59 PM] System.Private.CoreLib: Exception while executing function: CoreServiceCampaignEvents. MassTransit.Azure.ServiceBus.Core: An exception occurred creating the BrokeredMessageReceiver. Microsoft.Azure.ServiceBus: Entity cannot have auto-forwarding policy to itself.
[7/9/2020 4:15:59 PM] Message processing error (Action=UserCallback, ClientId=MessageReceiver1core-campaign-events/Subscriptions/core-service, EntityPath=core-campaign-events/Subscriptions/core-service, Endpoint=dev-cc-riad-al-jomai-bus.servicebus.windows.net)
[7/9/2020 4:15:59 PM] System.Private.CoreLib: Exception while executing function: CoreServiceCampaignEvents. MassTransit.Azure.ServiceBus.Core: An exception occurred creating the BrokeredMessageReceiver. Microsoft.Azure.ServiceBus: Entity cannot have auto-forwarding policy to itself.
Chris Patterson
@phatboyg
Just a reminder, this room is infrequently monitored, community support is on Discord: https://discord.gg/rNpQgYn
Damien Doumer
@DamienDoumer
Hello everyone, is there a way to force masstransit to use Queues instead of topics in Azure Service Bus ? I want to limit myself to the free tier of azure service bus and this limits me to use only queues and not topics. But mass transit by default creates a topic for each receiver endpoint. Does someone know a way to accomplish that Please?
Chris Patterson
@phatboyg
Just a reminder, this room is infrequently monitored, community support is on Discord: https://discord.gg/rNpQgYn
sunphlox
@sunphlox
Already solved by phatboyg on discord.
Rina Andriana
@randriana
Hello! How do I use ConnectSendAuditObservers?
Also, Discord is preferred as this is rarely checked.