Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error with Publish method #1193

Open
Maitri-Kata opened this issue Feb 18, 2025 · 0 comments
Open

Getting error with Publish method #1193

Maitri-Kata opened this issue Feb 18, 2025 · 0 comments

Comments

@Maitri-Kata
Copy link

Maitri-Kata commented Feb 18, 2025

While trying to publish multiple messages concurrently, I am getting following error:

Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.

Below is Stacktrace for error:

System.InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
at System.Collections.Generic.HashSet1.AddIfNotPresent(T value, Int32& location) at Rebus.Idempotency.IdempotencyData.GetOrCreate(MessageId messageId) at Rebus.Idempotency.IdempotentMessageOutgoingStep.Process(OutgoingStepContext context, Func1 next)
at Rebus.Pipeline.Send.SendOutgoingMessageStep.Process(OutgoingStepContext context, Func1 next) at Rebus.Pipeline.Send.ValidateOutgoingMessageStep.Process(OutgoingStepContext context, Func1 next)
at Rebus.Pipeline.Send.SerializeOutgoingMessageStep.Process(OutgoingStepContext context, Func1 next) at Rebus.Retry.Simple.VerifyCannotSendFailedMessageWrapperStep.Process(OutgoingStepContext context, Func1 next)
at Rebus.Pipeline.Send.AutoHeadersOutgoingStep.Process(OutgoingStepContext context, Func1 next) at Rebus.Pipeline.Send.FlowCorrelationIdStep.Process(OutgoingStepContext context, Func1 next)
at Rebus.Pipeline.Send.AssignDefaultHeadersStep.Process(OutgoingStepContext context, Func1 next) at Rebus.ServiceProvider.ServiceProviderProviderStep.Process(OutgoingStepContext context, Func1 next)
at Rebus.Bus.RebusBus.SendUsingTransactionContext(IEnumerable1 destinationAddresses, Message logicalMessage, ITransactionContext transactionContext) at Rebus.Bus.RebusBus.InnerSend(IEnumerable1 destinationAddresses, Message logicalMessage)
at Rebus.Bus.RebusBus.InnerPublish(String topic, Object eventMessage, IDictionary`2 optionalHeaders)

Dotnet Framework Version: 8.0
Rebus: 8.4.3
Rebus.Idempotency: 2.3.0
Rebus.Idempotency.MySql: 2.2.0


Step to reproduce:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant