docs.particular.net | All content for ParticularDocs
kandi X-RAY | docs.particular.net Summary
kandi X-RAY | docs.particular.net Summary
All content for ParticularDocs
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 docs.particular.net
docs.particular.net Key Features
docs.particular.net Examples and Code Snippets
Community Discussions
Trending Discussions on docs.particular.net
QUESTION
As per NServiceBus Azure Cosmos DB persistence documentation, the outbox deduplication data is kept for 7 days by default. However, this can easily add hundreds of outbox documents in a day for a high volume transaction DB. I understand we can change the default settings to reduce the outbox ttl
. However, before doing that, I would like to understand the following:
- What is the significance of keeping the outbox document for 7 days in Cosmos DB?
- What is the impact of reducing the
ttl
of the outbox document to, say, 4 days? Does it mean if a message has failed, it can be only recovered for the next 4 days? If yes, is there a way to clean up the outbox record for the transactions that are successful immediately?
ANSWER
Answered 2021-Aug-09 at 03:26What is the significance of keeping the outbox document for 7 days in Cosmos DB?
This is the default value. It's chosen to be on the safe side and ensure that no duplicates are reprocessed within 7 days, which is a fairly safe time range.
What is the impact of reducing the ttl of the outbox document to, say, 4 days?
If you reduce TTL to 4 days and there's a chance of a duplicate message arriving after that period, the duplicate will be processed rather than discarded.
Does it mean if a message has failed, it can be only recovered for the next 4 days?
The outbox feature is not about removing messages. It's used for de-duplication of the incoming messages to avoid unnecessary re-processing.
If yes, is there a way to clean up the outbox record for the transactions that are successful immediately?
You could set TTL to a very low value but then you're risking running into duplicate reprocessing as it's not about successful or unsuccessful incoming message processing but rather duplicates you cannot control. Not to mention that the outbox feature helps to reduce unnecessary handler execution upon incoming message retries in case dispatching has failed.
QUESTION
I have an Azure function and I'm trying to send a message with NServiceBus using Azure ServiceBus transport.
I have successfully got it working following this doc when the endpoint name does not have a “.” or period in the name. E.g.: ASBTriggerQueue
However, my endpoint name has a period, “.” and I do not have control to change the endpoint name.
With period in the name I get the following error:
The ‘NServiceBusFunctionEndpointTrigger-asb.triggerqueue’ function is in error: ‘NServiceBusFunctionEndpointTrigger-a sb.triggerqueue’ is not a valid function name.
Is anyone aware of workarounds to fix this issue?
...ANSWER
Answered 2021-Jul-16 at 23:48The problem is with the trigger function name. Functions doesn't like dots in it. With release 1.2.0 of NServiceBus.AzureFunctions.InProcess.ServiceBus
you can override trigger function name. See documentation for details
QUESTION
I'm using NServiceBus with SQL Persistance and MSSQL Server.
I want to be sure that I don't get invalid data in my database in high concurrent scenarios.
From the docs I know that the SQL persister uses pessimistic concurrency since version 4.1.1. But I'm not sure how it works exactly because under "Starting Saga" and "Changes to Saga state" only optimistic concurrency is mentioned.
Does each saga instance only handle one message at a time and all the remaining messages are waiting in the queue to be handled by the saga?
Also is it possible to configure the concurrency to use optimistic concurrency instead of pessimistic concurrency for the SQL persister?
...ANSWER
Answered 2021-Jun-01 at 07:03Both optimistic concurrency control and pessimistic locking result in a saga instance to only being able to handle 1 message.
Might multiple messages be handled then with :
Optimistic concurrency control: The 2nd+ writer will fail and the message will be retried.
Locking: THe lock ensures that multiple messages on the same saga instance will be delayed. Sometimes this can result in a deadlock due to lock escalation and then the message will be retried.
Regarding pessimisitic vs optimistic, you cannot choose. The latest version uses pessimistic locking. See https://docs.particular.net/persistence/sql/saga-concurrency:
Starting in version 4.1.1 conflicts cannot occur because the persistence uses pessimistic locking. Pessimistic locking is achieved by performing a SELECT ... FOR UPDATE or its dialect-specific equivalent.
Up to and including version 4.1, SQL persistence uses optimistic concurrency control when updating or deleting saga data.
QUESTION
Using NServiceBus v7.4.6 plus .NET Core 3.1 and getting the exception
The given key NServiceBus.RecoverabilitySettings was not present in the dictionary.
with the code below when trying to get RecoverabilitySettings
in the feature. What could be wrong?
ANSWER
Answered 2021-May-28 at 07:38Source: https://docs.particular.net/nservicebus/upgrades/7to8/#error-notification-events
In NServiceBus version 7.2, error notification events for MessageSentToErrorQueue, MessageHasFailedAnImmediateRetryAttempt, and MessageHasBeenSentToDelayedRetries using .NET events were deprecated in favor of Task-based callbacks. In NServiceBus version 8 and above, the event-based notifications will throw an error.
Error notifications can be set with the Task-based callbacks through the recoverability settings:
Settings API is not type-safe and behavior can change across major versions which prevents usage Obsolete in this case on RecoverabilitySettings
as that type is still used.
I've created the following issue as I think we could do better in the feedback on this specific breaking change:
QUESTION
I've been trying to get NServiceBus.Router working to allow endpoints using the AmazonSQS transport and the AzureServiceBus transport to communicate with each other. So far, I am able to get a command sent from the ASB endpoint through the router and handled by the SQS endpoint. However, when I publish an event from the SQS endpoint, it is not handled by the ASB endpoint even though I have registered the SQS endpoint as a publisher. I have no idea what I'm doing wrong, but looking at every example I can find from from the docs, it seems like it should work.
I have already tried adding another forwarding route in the reverse of what is below (SQS to ASB), but that did not solve the issue.
The endpoints and router are each running in .net 5 worker services.
I've made a sample project that reproduces the issue here, but here are some quick at-a-glance snippets that show the relevant setup:
Router Setup
...ANSWER
Answered 2021-May-10 at 15:47Unfortunately one of the recent SQS transport releases contains a change that makes the subscription work only by default in the context of a full NServiceBus endpoint. This feature is subscription batching.
In order for the Router to work correctly (Router does not run a full endpoint, just NServiceBus transport), you need to add this magic line to the SQS interface configuration:
QUESTION
I have an instance of NServiceBus that is used for multiple queues. Now I have only one queue that requires a special type of delay retries and a custom policy. In this queue I have a 3rd party call, and I want it to be retried 10 times with a specific pattern of time interval.
I have read the documentation about delayed retries, my understanding is that it will affect all the queues, not only the one I want. How this can be implemented?
I'm using NServiceBus with RabbitMq for testing envs and Azure Service Bus for prod envs.
...ANSWER
Answered 2021-Mar-31 at 16:11Recoverability policy is applied on the endpoint level. When you need a certain message type to be processed with a different recoverability policy, you can override the default recoverability policy to customize it to your needs. When you need a completely different number of delayed retries configured that does not match the rest of the messages, you should split the logical endpoint into two and have the message type that requires a different recoverability handled by the new endpoint.
QUESTION
I have a MessageHandler with a custom attribute on it. The behavior I'm testing does something based on the value of that attribute. The NServicebus documentation only gives unit tests examples of a behavior based on a mocked handler. How can I use my own fake or is there an other way I should test my behavior?
...ANSWER
Answered 2021-Mar-16 at 07:52To answer my own question. I made it work by letting my handlers inherit MessageHandler
.
QUESTION
I need to query a property of Saga Data class to get a list. It is stored on SqlPersistance table [Data] column as a serialized object. Think about a scenario that my SagaData has a property called UserName, so I want to query every saga related to that user. In a sloppy way, I can query the column content, get the list and can create Saga objects out of the content, by querying like:
...ANSWER
Answered 2020-Nov-03 at 10:20The only purpose of the SagaFinder is to find a single instance of a certain saga that correlates with the incoming message. I'm not aware of any framework functionalities to query saga (data) instances.
QUESTION
Consider this extremely simple .NET Core 3.1 (and .NET 5) application with no special config or hosted services:
...ANSWER
Answered 2020-Nov-02 at 19:30The host returned by CreateDefaultBuilder(...).Build()
is meant to represent the whole application. From docs:
The main reason for including all of the app's interdependent resources in one object is lifetime management: control over app startup and graceful shutdown.
The default builder registers many services in singleton scope and when the host is stopped all of these services are disposed or switched to some "stopped" state. For example before calling StopAsync
you can resolve IHostApplicationLifetime
:
QUESTION
NServiceBus docs say:
The Timeout Manager is enabled by default. However, it is automatically disabled for send-only endpoints and transports that support delayed delivery natively (i.e. Azure Service Bus).
SQL supports delayed messaging, yet max delay is 15 minutes.
Is NSB clever enough to figure out that requested timeout period exceeds max SQS interval and switch back to Timeout Manager? Or is it possible to force NSB to use Timeout Manager and ignore transport capabilities?
...ANSWER
Answered 2020-Aug-28 at 12:38The NServiceBus SQS transport has a feature called unrestricted delayed deliveries that enables the deferral of timeouts for an unrestricted period without using the TimeoutManager, using instead only the transport capabilities and FIFO queue support. You can find more information on the feature in the documentation https://docs.particular.net/transports/sqs/delayed-delivery
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install docs.particular.net
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