GreenPipes | asynchronous pipe implementation for the Task Parallel | Architecture library
kandi X-RAY | GreenPipes Summary
kandi X-RAY | GreenPipes Summary
GreenPipes is a middleware library for the Task Parallel Library. GreenPipes is a library built from the message pipeline of MassTransit. In fact, MassTransit is using GreenPipes, instead of the internal pipeline (it was entirely harvested to GreenPipes for that very purpose). In addition, since the pipeline is now standalone, it can be used with other libraries such as Automatonymous to get a cohesive understanding of the data flow through the pipeline.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of GreenPipes
GreenPipes Key Features
GreenPipes Examples and Code Snippets
Community Discussions
Trending Discussions on GreenPipes
QUESTION
I'm having a concurrency issue with MassTransit sagas.
I'm currently working on a POC with this flow:
- One thread produces 100 event that are published to MassTransit in a sequence.
- When the saga is instantiated it publishes another event to MassTransit.
- The new event is picked up by a Consumer that perform some business logic and publishes one of two resulting event to MassTransit.
- The resulting events from step 3. triggers a state change in the saga
I sometimes get exceptions like this Microsoft.EntityFrameworkCore.DbUpdateConcurrencyException: The database operation was expected to affect 1 row(s), but actually affected 0 row(s); data may have been modified or deleted since entities were loaded.
in step 4, and the state change is not persisted.
Here is the business logic code:
...ANSWER
Answered 2022-Mar-07 at 13:04The proper configuration in your SagaDefinition
is shown below. Note the use of UseMessageRetry
, instead of UseRetry
.
QUESTION
I have following code which create and IRequestClient
client and send request and waiting for the response. here you can see, I have set some headers value as well with GreenPipes
ANSWER
Answered 2022-Feb-01 at 20:38You can specify the headers inline with the Publish call:
QUESTION
When using the request/response pattern, during the deserialization of the response, an incompatibility error occurs. Apparently, the publisher serializer configuration is causing this issue, although the message is as expected.
Using the JsonProperty feature could isolate the problem, however, it does not reflect what was expected.
Versions .NET: 6.0; MassTRansit: 7.3.0; Newtonsoft: 13.0.1
...ANSWER
Answered 2021-Dec-01 at 17:40Thanks Wiktor Zychla, the issue led me to Nkot's workaround, which served me very well:
TypeNameHandlingConverter:
QUESTION
I want to be able to send message from a unit test to an ASP.Net Core application using the in-memory implementation of MassTransit. The in-memory implementation is important as the actual application uses ActiveMQ but we want to replace that during testing with the in-memory implementation.
I started creating a new ASP.Net Core API project from VS2019 using .NET 5 and added MassTransit to Startup
as follows:
ANSWER
Answered 2021-Nov-25 at 13:52You are awaiting the publish, but at that point, the test exits and starts tearing down the application. You would need to wait until the consumer has completed, since it's called asynchronously. When using the in-memory test harness, there are monitors that can be used to wait until there is no bus activity, but I have no idea how you'd do that in your scenario above.
How are you expecting to assert that the consumer actually completed the work?
To prove this, add a simple await Task.Delay(1000)
and see if the consumer executes.
QUESTION
I'm trying to set MassTransit up with Azure Service Bus. I want to use the DLQ instead of relying on _skipped
and _error
queues, but I'm not sure if I'm doing it wrong.
This is a simplified version of my setup:
...ANSWER
Answered 2021-Oct-26 at 14:13With a subscription endpoint, the DLQ is the default behavior.
What you've configured is likely conflicting with the default configuration. If you get rid of the following lines, it should work as expected:
QUESTION
So one in a hundred (Mediator)messages does not get consumed and I can't figure out why. Messages sent via rabbitMq are fine.
Exception:
...ANSWER
Answered 2021-Sep-23 at 07:58So the problem was in the scope. I didnt add the Middleware for getting the scope for controllers. As writtent here: https://masstransit-project.com/usage/mediator.html
Since adding the AddHttpContextAccessor, the problem is gone.
QUESTION
I am trying to connect two services using RabbitMQ queue. First services pushes value to queue, second retrieves it and process. All is fine, but when second service tries to process job, it throws exception. Queue item stays in JobAttempt queue without any information, and consumer service retries to process job, but throws same exception every time.
Exception
...ANSWER
Answered 2021-Sep-21 at 11:21If I had to guess, without any other error log details, I would think that the delayed exchange plug-in is not installed/enabled on RabbitMQ.
QUESTION
I'm using MassTransit.Kafka for produce and consume messages in batches. When I try to consume message one by one everything works fine, but when I try to consume messages in batches I get an error:
...ANSWER
Answered 2021-Apr-11 at 16:14In the case of a topic endpoint, you still specify TopicEndpoint
for the TopicEndpoint, and consume Batch
in your consumer. When configured on the topic endpoint, using ConfigureConsumer(ctx)
it will properly handle the mapping of a batch of events to your consumer.
Assuming you are on the latest version of MassTransit, it should increase the ConcurrentMessageLimit on the topic endpoint to match the batch message capacity.
QUESTION
I try to use MassTransit SQS to publish a message. Here is my configuration code:
...ANSWER
Answered 2021-Feb-09 at 18:04You can set the MessageGroupId
when publishing:
QUESTION
I use MassTransit SQS. I found out, when publishing a message, this problem occurs:
User is not authorized to perform: SNS:CreateTopic on resource
So I need rights to create topics.
I solved it by asking the admin to extend rights. This works and topics can be created. However, it seems that the topic names are automatically generated based on the class names. Can I modify this behaviour programmatically (so by giving a self described topic name).
This can be useful for creating a FIFO topic (which needs to have a name ending with .fifo).
Update
I am now familiar with formatting (thanks for telling me Chris) with SetEntityName
.
But my problem seems to be really fifo specific.
This works:
...ANSWER
Answered 2021-Feb-09 at 17:35You can configure the message topology to specify the entity name formatting.
For instance, to change the topic name for the OrderSubmitted event:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install GreenPipes
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page