- Created by Panagiotis Papanastasiou on Jul 30, 2021
- Translations
You are viewing an old version of this page. View the current version.
Compare with Current View Page History
Version 1 Next »
RabbitMQ holds several queues for each push/pull BSS object. One for the creation of the object and one for the update of an existing object. Each time a sync is initiated, a “sync queue” is responsible for keeping track of the API calls. If something erroneous occurs during a specific period of time, then an automatic notification alert is dispatched to the BSS Admin user.
Let’s examine one such example in the following two sections of this page, where in the first one, you can witness the initiation of the API push/create call, while on the other, you can witness the error handling along with the notification dispatch.
View of Queues in Rabbit MQ
In the following example, we attempt to push/create a BSS account via the API tester. Therefore, the object utilizes the generic “SyncQueue” where it searches the account in the BSS database and performs the “push/create” API call.
By design, the policy for all packages in BSS is 5 attempts to sync an object by 20” intervals.
The following example is the view of an attempt to push an account via the API tester by utilizing the generic “IntegrationSyncQueue”.
By continuing to the below section of this page, you can better understand how the errors are being handled.
Error handling and Alert notification
In case of an error, the failed object is returned to a toxic queue that is automatically created per error category. For this error, RabbitMQ created “IntegrationSyncQueue_error“, and once the item is added to the queue, an e-mail is triggered and therefore is automatically dispatched to notify the predefined BSS Admin with the respective error response.
Example for failed Account:
{ "Message": { "InstanceId": "8e0fa8e6-799b-4020-b3dc-ad3400915aa2", "ObjectId": "safedsdggfds", >>> BSS GUID "SyncItem": "Account", "SyncEvent": 1, >>> Attempt "SkipSyncItem": false, "IsApiTest": true, >>> The attempt happened by the API Tester "OrganizationId": 1, >>> BSS organization ID "UserId": 2, >>> BSS userID "QueueName": "IntegrationSyncQueue" }, "FaultId": "544c0000-67a9-002b-6b2e-08d94d03aabd", "FaultedMessageId": "544c0000-67a9-002b-bd37-08d94d036c47", "Timestamp": "2021-07-22T11:27:19.4413526Z", "Exceptions": [ { "ExceptionType": "Iwcp.Platform.Integration.Api.Exceptions.IntegrationServiceException", "InnerException": null, "StackTrace": " at Iwcp.Platform.Integration.Impl.Services.PropertyService.ThrowNotFoundError(ModuleType module, String id) in C:\\Projects\\Iwcp.Platform.Integration\\Iwcp.Platform.Integration.Impl\\Services\\PropertyService.cs:line 1158\r\n at Iwcp.Platform.Integration.Impl.Services.PropertyService.SetAccount(SyncObject syncObject) in C:\\Projects\\Iwcp.Platform.Integration\\Iwcp.Platform.Integration.Impl\\Services\\PropertyService.cs:line 242\r\n at Iwcp.Platform.Integration.Impl.Services.PropertyService.LoadModuleData(SyncObject syncObject) in C:\\Projects\\Iwcp.Platform.Integration\\Iwcp.Platform.Integration.Impl\\Services\\PropertyService.cs:line 172\r\n at Iwcp.Platform.Integration.Impl.Services.PropertyService.InitializeSyncObjectData(SyncObject syncObject) in C:\\Projects\\Iwcp.Platform.Integration\\Iwcp.Platform.Integration.Impl\\Services\\PropertyService.cs:line 93\r\n at Iwcp.Platform.Integration.Impl.Services.LoadService.LoadForPush(SyncObject syncObject, ProviderConfig integrationProviderConfig) in C:\\Projects\\Iwcp.Platform.Integration\\Iwcp.Platform.Integration.Impl\\Services\\LoadService.cs:line 190\r\n at Iwcp.Platform.Integration.Impl.Services.SyncService.Sync(Guid providerConfigID, String syncItem, SyncEvent syncEvent, String objectID, Int32 userId, Boolean skipSyncAction, Boolean isApiTest) in C:\\Projects\\Iwcp.Platform.Integration\\Iwcp.Platform.Integration.Impl\\Services\\SyncService.cs:line 197\r\n at Iwcp.Platform.Integration.Service.Consumers.Common.IntegrationImmmediateSyncConsumer.<>c__DisplayClass8_0.b__0() in C:\\Projects\\Iwcp.Platform.Integration\\Iwcp.Platform.Integration.Service\\Consumers\\Common\\IntegrationImmmediateSyncConsumer.cs:line 54\r\n at System.Threading.Tasks.Task.InnerInvoke()\r\n at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)\r\n at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at Iwcp.Platform.Integration.Service.Consumers.Common.IntegrationImmmediateSyncConsumer.Consume(ConsumeContext`1 context) in C:\\Projects\\Iwcp.Platform.Integration\\Iwcp.Platform.Integration.Service\\Consumers\\Common\\IntegrationImmmediateSyncConsumer.cs:line 52\r\n at MassTransit.Scoping.ScopeConsumerFactory`1.Send[TMessage](ConsumeContext`1 context, IPipe`1 next)\r\n at MassTransit.Pipeline.Filters.ConsumerMessageFilter`2.GreenPipes.IFilter<MassTransit.ConsumeContext>.Send(ConsumeContext`1 context, IPipe`1 next)\r\n at MassTransit.Pipeline.Filters.ConsumerMessageFilter`2.GreenPipes.IFilter<MassTransit.ConsumeContext>.Send(ConsumeContext`1 context, IPipe`1 next)\r\n at GreenPipes.Filters.RetryFilter`1.Attempt(TContext context, RetryContext`1 retryContext, IPipe`1 next)", "Message": "Accounts with ID safedsdggfds not found", >>> Error msg "Source": "Iwcp.Platform.Integration.Impl" } ], "Host": { >>> Host machine "MachineName": "SKGDEV33", "ProcessName": "Iwcp.Platform.Integration.Service", "ProcessId": 2016, "Assembly": "Iwcp.Platform.Integration.Service", "AssemblyVersion": "1.2.7.0", "FrameworkVersion": "3.1.17", "MassTransitVersion": "6.0.2.0", "OperatingSystemVersion": "Microsoft Windows NT 6.2.9200.0" }, "FaultMessageTypes": [ "urn:message:Iwcp.Platform.Integration.Api.Messages:SendIntegrationSyncMessage", "urn:message:Iwcp.Platform.CloudBus.Api:IPlatformMessage", "urn:message:Iwcp.Platform.CloudBus.Api:IAppMessage" ] }
Table of Contents
- No labels