masstransit

Mass Transit : No consumer

浪子不回头ぞ 提交于 2019-12-06 08:12:17
Have a newbie question about Mass Transit ESB I am trying MassTransit for the first time and trying to get my head around how the queues are created and how messages are consumed. I have a web application and a Console application trying to do publish / consume respectively This is my initialization code. var bus = Bus.Factory.CreateUsingRabbitMq(sbc => { var host = sbc.Host(new Uri(hostName), h => { h.Username(userName); h.Password(password); }); }); Then from the web app i call the following code. using (Bus.Start()) { var pubr = Bus.Publish<T>(message); pubr.Wait(); } This leads to the

MassTransit 2.6.1 Request/Response pattern - Response times out

只谈情不闲聊 提交于 2019-12-06 05:57:45
问题 I'm looking at MassTransit as a ServiceBus implementation to use in a web project. I am playing with the Request/Response pattern and am seeing a long delay between the consumer receiving the message and responding, and the request publisher handling the response; sometimes, it seems like the response is never going to come through (having left it running for 10 minutes, the response has still not come through). the only times that I have seen the handle delegate get called with the response

MassTransit and Simple Injector [closed]

你说的曾经没有我的故事 提交于 2019-12-06 05:30:01
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 6 years ago . I'm reviewing the MassTransit Distributed Application Framework for .NET. According to the website MassTransit has been built from the beginning with the concept of an IoC container being involved and provides

Masstransit one fault consumer for all fault message

不羁岁月 提交于 2019-12-06 00:54:05
How to have one generic consumer that handle all Fault Messages ? Do I need to register Fault Consumer for each of my fault messages? Alexey Zimarev Why not consume Fault ? public class WantAllFaultsGimmeThem : IConsumer<Fault> { public async Task Consume(ConsumeContext<Fault> context) { // whatever you want to do here } } The only issue is that the Message is not part of this interface and therefore it will not be even deserialised. so you will not have access to the message, only to the message id. 来源: https://stackoverflow.com/questions/48623670/masstransit-one-fault-consumer-for-all-fault

MassTransit MSMQ Pub with multi-sub. When is RuntimeServices ready?

不打扰是莪最后的温柔 提交于 2019-12-05 18:39:49
I've set up a simple test comprising a publisher with two subscribers, all running on a single machine using MSMQ and MassTransit (2.1.1) RuntimeServices which is using a local Sql Server database. I've included the Bus set up code below so you can see what's set up. I'm starting each component manually and independently to try to workout what happens if a subscriber ins't running. I ran the two subscribers first so the queues and subscriptions are all set up and then quit them both, without unsubscribing from the messages. If I then run the publisher on its own, which dumps 400 messages in

Why am I getting messages in the skipped queue

做~自己de王妃 提交于 2019-12-05 13:52:27
I have a saga setup in a fork/join configuration. Events defined on the saga FileMetadataMsg FileReadyMsg SomeOtherMsg Process starts off when a file comes in on a separate listener. Publishes SagaStart(correlationId) Publishes FileSavedToMsg(correlationId, fileLoc) Publishes FileMetadataMsg(correlationId, metadata) Publishes FileReadyMsg(correlationId, fileLoc) Downstream endpoint of does some work on the file Consumer<FileSavedToMsg> Publishes SomeOtherMsg(GotTheFileMsg.correlationId, data) I am getting a FileSavedToMsg in the saga_skipped queue. I can only assume it's due to having a

Unit of work when using MassTransit

浪子不回头ぞ 提交于 2019-12-05 01:29:40
问题 I'm looking for a way to hook on the message handling pipeline and do some work after a consumer finishes handling some message. My intention is to open a new session and start a transaction(could be done the IoC Container) before handling and disposing them right after it. In NServiceBus I would use the IMessageModule interface to hook in. does have anything similar to it? Actually disposing the the handler would also do it for, but as I'm using StructureMap as the ObjectBuilder, the Release

MassTransit with RabbitMQ: When is a message moved to the error queue

守給你的承諾、 提交于 2019-12-04 23:57:21
I am using RabbitMQ version 3.0.2 & I see close to 1000 message in Error queue. I want to know At what point messages are moved to the error queues? Is there a way to know why a certain message is being moved to an error queue? Is there any way to move message from error queue to normal queue? Thank you a) they fail to deserialize or b) the consumer throws an exception processing that message five times Not really... If you peek at the message in the queue, the payload headers might contain a note but I don't think we did that. If you turn logging on (NLog, log4net, etc) you should be able to

How to peek at message while dependencies are being built?

末鹿安然 提交于 2019-12-04 16:17:12
I building multitenancy into the unit of work for a set of services. I want to keep the tenancy question out of the way of day-to-day business domain work, and I do not want to touch every existing consumer in the system (I am retrofitting the multitenancy onto a system without any prior concept of a tenant). Most messages in the system will be contexted by a tenant. However, there will be some infrastructure messages which will not be, particularly for the purpose of automating tenant creation. I need a way of determining whether to use a tenant-contexted unit of work, or a infrastructure

MassTransit capping message rates at 10

。_饼干妹妹 提交于 2019-12-04 13:15:26
I have a mass transit consumer service set up to work with RabbitMQ and I can't figure out how to increase the speed of the consumer - it seems to hard cap at 10 messages received per second. I have tried the steps listed here: https://groups.google.com/forum/#!msg/masstransit-discuss/plP4n2sixrY/xfORgTPqcwsJ , with no success - setting the prefetch and the concurrent consumers to 25 does nothing other than increasing the acknowledged messages, but it doesn't increase the rate at which the messages are downloaded. My config is as follows: ServiceBusFactory.ConfigureDefaultSettings(x => { x