3.4.8
Message Consumers and Handlers
- MessageReader name has changed to MessageObserver.
- MessageObserver can be used in connectors via a property.
- Message Consumers are added; IQueueConsumer for queue messages, IDirectConsumer for direct messages
- MessageObservers can register types implemented with consumer interfaces with RegisterAssemblyConsumers, RegisterConsumer and RegisterConsumers methods.
- ITwinoRequestHandler interface added for handling request messages. Implementation has two methods, if handle method throws error, error method is called
- Attributes are added for consumers and handlers
- ChannelNameAttribute can be applied on models or queue consumers, to specify channel name
- QueueIdAttribute can be applied on models or queue consumers, to specify queue id
- DirectTargetAttribute can be applied on models or direct consumers, to specify receiver of the message
- ContentTypeAttribute can be applied on models or direct consumers, to specify content type of the message
- HighPriorityMessageAttribute can be applied on models to mark as high priority on send
- OnlyFirstAcquirerAttribute can be applied on models to mark for only first acquirer can receive when sent
- PushExceptionsAttribute can be applied on consumers to push exception to a queue when it's thrown in consume method. PushExceptonAttribute can also be used on request handlers.
- AutoAckAttribute can be applied on consumers, sends acknowledge when consume operation completed successfuly
- AutoNackAttribute can be applied on consumers, sends negative acknowledge when consume operation throws exception
Serialization
- IMessageContentSerializer interface added for serializing and deserializing JSON messages.
- Twino.Client.TMQ assembly has NewtonsoftContentSerializer and SystemJsonContentSerializer classes for JSON serialization
- Connectors have a property with name ContentSerializer, it's used for all serialization over connectors. Observers in connectors use same object too.
- TmqClient class has a property with name JsonSerializer, it's used for all serialization over client.
- Serialize and Deserialize methods are added instead of Json methods in TmqMessage class. New methods requires IMessageContentSerializer as parameter
Messaging Queue and Server Changes
- MqServer name has changed to TwinoMQ
- TwinoMqBuilder is added for building TwinoMQ objects. Builder instance can be created with static Create method. TwinoMqBuilder has many features with fluent api.
- TwinoMQ Default...Handler methods are removed. They are set as fluent api with TwinoMqBuilder.
- TwinoMQ Delivery Handler implementation is improved, implementation factory action is used for each queue creation to get it's handler
- PersistentDeliveryHandler is added for quick persistent queue usages
- New Extension methods added to TwinoMqBuilder object such as AddPersistentQueues, UsePersistentDeliveryHandler
- Many usage improvements and some bug fixes