ValueMessage is a built-in BaseMessage used for simple Message Broker payloads that only need to carry one or more values. It provides generic variants supporting between one and four values.
ValueMessage is intended for straightforward payloads where introducing a dedicated message type would provide little additional value. For more complex payloads, or when the meaning of the contained values is not immediately clear from the Topic and their types, a custom BaseMessage implementation should be preferred.
Although variants supporting up to four values are available for compatibility, applications should avoid using the higher-arity variants as a substitute for defining a more descriptive custom message when the payload becomes complex.
| Constructor | ValueMessage(T value) |
|---|---|
| Description | Creates a message containing specified value. |
| Property | T Value |
|---|---|
| Description | Returns the value carried by the message. |
| Constructor | ValueMessage(T1 first, T2 second) |
|---|---|
| Description | Creates a message containing two values. |
| Property | T1 First |
|---|---|
| Description | Returns the first value carried by the message. |
| Property | T2 Second |
|---|---|
| Description | Returns the second value carried by the message. |
| Constructor | ValueMessage(T1 first, T2 second, T3 third) |
|---|---|
| Description | Creates a message containing three values. |
| Property | T1 First |
|---|---|
| Description | Returns the first value carried by the message. |
| Property | T2 Second |
|---|---|
| Description | Returns the second value carried by the message. |
| Property | T3 Third |
|---|---|
| Description | Returns the third value carried by the message. |
| Constructor | ValueMessage(T1 first, T2 second, T3 third, T4 fourth) |
|---|---|
| Description | Creates a message containing four values. |
| Property | T1 First |
|---|---|
| Description | Returns the first value carried by the message. |
| Property | T2 Second |
|---|---|
| Description | Returns the second value carried by the message. |
| Property | T3 Third |
|---|---|
| Description | Returns the third value carried by the message. |
| Property | T4 Fourth |
|---|---|
| Description | Returns the fourth value carried by the message. |