/
com.azure.messaging.servicebus.ServiceBusMessage.yml
396 lines (396 loc) · 37.6 KB
/
com.azure.messaging.servicebus.ServiceBusMessage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
### YamlMime:JavaType
uid: "com.azure.messaging.servicebus.ServiceBusMessage"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage"
name: "ServiceBusMessage"
nameWithType: "ServiceBusMessage"
summary: "The data structure encapsulating the message being sent to Service Bus."
inheritances:
- "<xref href=\"java.lang.Object?displayProperty=fullName\" data-throw-if-not-resolved=\"False\" />"
inheritedClassMethods:
- classRef: "java.lang.<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
methodsRef:
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--\">clone</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-\">equals</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--\">finalize</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--\">getClass</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--\">hashCode</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--\">notify</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--\">notifyAll</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--\">toString</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-\">wait</a>"
- "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-\">wait</a>"
syntax: "public class **ServiceBusMessage**"
constructors:
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.ServiceBusMessage(byte[])"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.ServiceBusMessage(byte[] body)"
name: "ServiceBusMessage(byte[] body)"
nameWithType: "ServiceBusMessage.ServiceBusMessage(byte[] body)"
summary: "Creates a <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> with given byte array body."
parameters:
- description: "The content of the Service bus message."
name: "body"
type: "<xref href=\"byte?alt=byte&text=byte\" data-throw-if-not-resolved=\"False\" />[]"
syntax: "public ServiceBusMessage(byte[] body)"
desc: "Creates a <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> with given byte array body."
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.ServiceBusMessage(com.azure.core.amqp.models.AmqpMessageBody)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.ServiceBusMessage(AmqpMessageBody amqpMessageBody)"
name: "ServiceBusMessage(AmqpMessageBody amqpMessageBody)"
nameWithType: "ServiceBusMessage.ServiceBusMessage(AmqpMessageBody amqpMessageBody)"
summary: "This constructor provides an easy way to create <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> with message body as AMQP Data types `SEQUENCE` and `VALUE`."
parameters:
- description: "amqp message body."
name: "amqpMessageBody"
type: "<xref href=\"com.azure.core.amqp.models.AmqpMessageBody?alt=com.azure.core.amqp.models.AmqpMessageBody&text=AmqpMessageBody\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ServiceBusMessage(AmqpMessageBody amqpMessageBody)"
desc: "This constructor provides an easy way to create <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> with message body as AMQP Data types `SEQUENCE` and `VALUE`. In case of `SEQUENCE`, tt support sending and receiving of only one AMQP Sequence at present. If you are sending message with single byte array or String data, you can also use other constructor."
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.ServiceBusMessage(com.azure.core.util.BinaryData)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.ServiceBusMessage(BinaryData body)"
name: "ServiceBusMessage(BinaryData body)"
nameWithType: "ServiceBusMessage.ServiceBusMessage(BinaryData body)"
summary: "Creates a <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> containing the `body`.The <xref uid=\"com.azure.core.util.BinaryData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BinaryData\"></xref> provides various convenience API representing byte array."
parameters:
- description: "The data to set for this <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
name: "body"
type: "<xref href=\"com.azure.core.util.BinaryData?alt=com.azure.core.util.BinaryData&text=BinaryData\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ServiceBusMessage(BinaryData body)"
desc: "Creates a <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> containing the `body`.The <xref uid=\"com.azure.core.util.BinaryData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BinaryData\"></xref> provides various convenience API representing byte array. It also provides a way to serialize <xref uid=\"java.lang.Object\" data-throw-if-not-resolved=\"false\" data-raw-source=\"Object\"></xref> into <xref uid=\"com.azure.core.util.BinaryData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BinaryData\"></xref>."
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.ServiceBusMessage(com.azure.messaging.servicebus.ServiceBusReceivedMessage)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.ServiceBusMessage(ServiceBusReceivedMessage receivedMessage)"
name: "ServiceBusMessage(ServiceBusReceivedMessage receivedMessage)"
nameWithType: "ServiceBusMessage.ServiceBusMessage(ServiceBusReceivedMessage receivedMessage)"
summary: "Creates a <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> using properties from `receivedMessage`."
parameters:
- description: "The received message to create new message from."
name: "receivedMessage"
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusReceivedMessage?alt=com.azure.messaging.servicebus.ServiceBusReceivedMessage&text=ServiceBusReceivedMessage\" data-throw-if-not-resolved=\"False\" />"
syntax: "public ServiceBusMessage(ServiceBusReceivedMessage receivedMessage)"
desc: "Creates a <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> using properties from `receivedMessage`. This is normally used when a <xref uid=\"com.azure.messaging.servicebus.ServiceBusReceivedMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusReceivedMessage\"></xref> needs to be sent to another entity."
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.ServiceBusMessage(java.lang.String)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.ServiceBusMessage(String body)"
name: "ServiceBusMessage(String body)"
nameWithType: "ServiceBusMessage.ServiceBusMessage(String body)"
summary: "Creates a <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> with a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"UTF-8\"></xref> encoded body."
parameters:
- description: "The content of the Service Bus message."
name: "body"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ServiceBusMessage(String body)"
desc: "Creates a <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> with a <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"UTF-8\"></xref> encoded body."
methods:
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.addContext(java.lang.String,java.lang.Object)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.addContext(String key, Object value)"
name: "addContext(String key, Object value)"
nameWithType: "ServiceBusMessage.addContext(String key, Object value)"
summary: "Adds a new key value pair to the existing context on Message."
parameters:
- description: "The key for this context object"
name: "key"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- description: "The value for this context object."
name: "value"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>"
syntax: "public ServiceBusMessage addContext(String key, Object value)"
desc: "Adds a new key value pair to the existing context on Message."
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getApplicationProperties()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getApplicationProperties()"
name: "getApplicationProperties()"
nameWithType: "ServiceBusMessage.getApplicationProperties()"
summary: "Gets the set of free-form <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> properties which may be used for passing metadata associated with the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> during Service Bus operations."
syntax: "public Map<String,Object> getApplicationProperties()"
desc: "Gets the set of free-form <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> properties which may be used for passing metadata associated with the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> during Service Bus operations. A common use-case for `getApplicationProperties()` is to associate serialization hints for the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getBody()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getBody()\"></xref> as an aid to consumers who wish to deserialize the binary data."
returns:
description: "Application properties associated with this <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/util/Map.html\">Map</a><<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>,<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html\">Object</a>>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getBody()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getBody()"
name: "getBody()"
nameWithType: "ServiceBusMessage.getBody()"
summary: "Gets the actual payload wrapped by the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
syntax: "public BinaryData getBody()"
desc: "Gets the actual payload wrapped by the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>.\n\nThe <xref uid=\"com.azure.core.util.BinaryData\" data-throw-if-not-resolved=\"false\" data-raw-source=\"BinaryData\"></xref> wraps byte array and is an abstraction over many different ways it can be represented. It provides convenience APIs to serialize/deserialize the object.\n\nIf the means for deserializing the raw data is not apparent to consumers, a common technique is to make use of <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getApplicationProperties()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getApplicationProperties()\"></xref> when creating the event, to associate serialization hints as an aid to consumers who wish to deserialize the binary data."
returns:
description: "Binary data representing the payload."
type: "<xref href=\"com.azure.core.util.BinaryData?alt=com.azure.core.util.BinaryData&text=BinaryData\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getContentType()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getContentType()"
name: "getContentType()"
nameWithType: "ServiceBusMessage.getContentType()"
summary: "Gets the content type of the message."
syntax: "public String getContentType()"
desc: "Gets the content type of the message.\n\nOptionally describes the payload of the message, with a descriptor following the format of RFC2045, Section 5, for example \"application/json\"."
returns:
description: "The content type of the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getCorrelationId()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getCorrelationId()"
name: "getCorrelationId()"
nameWithType: "ServiceBusMessage.getCorrelationId()"
summary: "Gets a correlation identifier."
syntax: "public String getCorrelationId()"
desc: "Gets a correlation identifier.\n\nAllows an application to specify a context for the message for the purposes of correlation, for example reflecting the MessageId of a message that is being replied to."
returns:
description: "The correlation id of this message."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getMessageId()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getMessageId()"
name: "getMessageId()"
nameWithType: "ServiceBusMessage.getMessageId()"
summary: "Gets the message id."
syntax: "public String getMessageId()"
desc: "Gets the message id.\n\nThe message identifier is an application-defined value that uniquely identifies the message and its payload. The identifier is a free-form string and can reflect a GUID or an identifier derived from the application context. If enabled, the [duplicate detection][] feature identifies and removes second and further submissions of messages with the same `messageId`.\n\n\n[duplicate detection]: https://docs.microsoft.com/azure/service-bus-messaging/duplicate-detection"
returns:
description: "Id of the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getPartitionKey()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getPartitionKey()"
name: "getPartitionKey()"
nameWithType: "ServiceBusMessage.getPartitionKey()"
summary: "Gets the partition key for sending a message to a partitioned entity."
syntax: "public String getPartitionKey()"
desc: "Gets the partition key for sending a message to a partitioned entity.\n\nFor [partitioned entities][], setting this value enables assigning related messages to the same internal partition, so that submission sequence order is correctly recorded. The partition is chosen by a hash function over this value and cannot be chosen directly. For session-aware entities, the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getSessionId()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"sessionId\"></xref> property overrides this value.\n\n\n[partitioned entities]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-partitioning"
returns:
description: "The partition key of this message."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getRawAmqpMessage()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getRawAmqpMessage()"
name: "getRawAmqpMessage()"
nameWithType: "ServiceBusMessage.getRawAmqpMessage()"
summary: "Gets the <xref uid=\"com.azure.core.amqp.models.AmqpAnnotatedMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AmqpAnnotatedMessage\"></xref>."
syntax: "public AmqpAnnotatedMessage getRawAmqpMessage()"
desc: "Gets the <xref uid=\"com.azure.core.amqp.models.AmqpAnnotatedMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AmqpAnnotatedMessage\"></xref>."
returns:
description: "The raw AMQP message."
type: "<xref href=\"com.azure.core.amqp.models.AmqpAnnotatedMessage?alt=com.azure.core.amqp.models.AmqpAnnotatedMessage&text=AmqpAnnotatedMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getReplyTo()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getReplyTo()"
name: "getReplyTo()"
nameWithType: "ServiceBusMessage.getReplyTo()"
summary: "Gets the address of an entity to send replies to."
syntax: "public String getReplyTo()"
desc: "Gets the address of an entity to send replies to.\n\nThis optional and application-defined value is a standard way to express a reply path to the receiver of the message. When a sender expects a reply, it sets the value to the absolute or relative path of the queue or topic it expects the reply to be sent to."
returns:
description: "ReplyTo property value of this message"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getReplyToSessionId()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getReplyToSessionId()"
name: "getReplyToSessionId()"
nameWithType: "ServiceBusMessage.getReplyToSessionId()"
summary: "Gets or sets a session identifier augmenting the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getReplyTo()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ReplyTo\"></xref> address."
syntax: "public String getReplyToSessionId()"
desc: "Gets or sets a session identifier augmenting the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getReplyTo()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ReplyTo\"></xref> address.\n\nThis value augments the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getReplyTo()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"reply to\"></xref> information and specifies which `sessionId` should be set for the reply when sent to the reply entity."
returns:
description: "The <code>getReplyToGroupId</code> property value of this message."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getScheduledEnqueueTime()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getScheduledEnqueueTime()"
name: "getScheduledEnqueueTime()"
nameWithType: "ServiceBusMessage.getScheduledEnqueueTime()"
summary: "Gets the scheduled enqueue time of this message."
syntax: "public OffsetDateTime getScheduledEnqueueTime()"
desc: "Gets the scheduled enqueue time of this message.\n\nThis value is used for delayed message availability. The message is safely added to the queue, but is not considered active and therefore not retrievable until the scheduled enqueue time. Mind that the message may not be activated (enqueued) at the exact given datetime; the actual activation time depends on the queue's workload and its state."
returns:
description: "the datetime at which the message will be enqueued in Azure Service Bus"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getSessionId()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getSessionId()"
name: "getSessionId()"
nameWithType: "ServiceBusMessage.getSessionId()"
summary: "Gets the session identifier for a session-aware entity."
syntax: "public String getSessionId()"
desc: "Gets the session identifier for a session-aware entity.\n\nFor session-aware entities, this application-defined value specifies the session affiliation of the message. Messages with the same session identifier are subject to summary locking and enable exact in-order processing and demultiplexing. For session-unaware entities, this value is ignored. See [Message Sessions][].\n\n\n[Message Sessions]: https://docs.microsoft.com/azure/service-bus-messaging/message-sessions"
returns:
description: "The session id of the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getSubject()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getSubject()"
name: "getSubject()"
nameWithType: "ServiceBusMessage.getSubject()"
summary: "Gets the subject for the message."
syntax: "public String getSubject()"
desc: "Gets the subject for the message.\n\nThis property enables the application to indicate the purpose of the message to the receiver in a standardized fashion, similar to an email subject line. The mapped AMQP property is \"subject\"."
returns:
description: "The subject for the message."
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getTimeToLive()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getTimeToLive()"
name: "getTimeToLive()"
nameWithType: "ServiceBusMessage.getTimeToLive()"
summary: "Gets the duration before this message expires."
syntax: "public Duration getTimeToLive()"
desc: "Gets the duration before this message expires.\n\nThis value is the relative duration after which the message expires, starting from the instant the message has been accepted and stored by the broker, as captured in <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getScheduledEnqueueTime()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"#getScheduledEnqueueTime()\"></xref>. When not set explicitly, the assumed value is the DefaultTimeToLive set for the respective queue or topic. A message-level TimeToLive value cannot be longer than the entity's DefaultTimeToLive setting and it is silently adjusted if it does."
returns:
description: "Time to live duration of this message"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.getTo()"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.getTo()"
name: "getTo()"
nameWithType: "ServiceBusMessage.getTo()"
summary: "Gets the \"to\" address."
syntax: "public String getTo()"
desc: "Gets the \"to\" address.\n\nThis property is reserved for future use in routing scenarios and presently ignored by the broker itself. Applications can use this value in rule-driven [auto-forward chaining][] scenarios to indicate the intended logical destination of the message.\n\n\n[auto-forward chaining]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding"
returns:
description: "\"To\" property value of this message"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.setContentType(java.lang.String)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.setContentType(String contentType)"
name: "setContentType(String contentType)"
nameWithType: "ServiceBusMessage.setContentType(String contentType)"
summary: "Sets the content type of the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
parameters:
- description: "RFC2045 Content-Type descriptor of the message."
name: "contentType"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ServiceBusMessage setContentType(String contentType)"
desc: "Sets the content type of the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>.\n\nOptionally describes the payload of the message, with a descriptor following the format of RFC2045, Section 5, for example \"application/json\"."
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.setCorrelationId(java.lang.String)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.setCorrelationId(String correlationId)"
name: "setCorrelationId(String correlationId)"
nameWithType: "ServiceBusMessage.setCorrelationId(String correlationId)"
summary: "Sets a correlation identifier."
parameters:
- description: "correlation id of this message"
name: "correlationId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ServiceBusMessage setCorrelationId(String correlationId)"
desc: "Sets a correlation identifier."
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.setMessageId(java.lang.String)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.setMessageId(String messageId)"
name: "setMessageId(String messageId)"
nameWithType: "ServiceBusMessage.setMessageId(String messageId)"
summary: "Sets the message id."
parameters:
- description: "The message id to be set."
name: "messageId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ServiceBusMessage setMessageId(String messageId)"
desc: "Sets the message id."
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.setPartitionKey(java.lang.String)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.setPartitionKey(String partitionKey)"
name: "setPartitionKey(String partitionKey)"
nameWithType: "ServiceBusMessage.setPartitionKey(String partitionKey)"
summary: "Sets a partition key for sending a message to a partitioned entity"
parameters:
- description: "The partition key of this message."
name: "partitionKey"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ServiceBusMessage setPartitionKey(String partitionKey)"
desc: "Sets a partition key for sending a message to a partitioned entity"
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.setReplyTo(java.lang.String)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.setReplyTo(String replyTo)"
name: "setReplyTo(String replyTo)"
nameWithType: "ServiceBusMessage.setReplyTo(String replyTo)"
summary: "Sets the address of an entity to send replies to."
parameters:
- description: "ReplyTo property value of this message"
name: "replyTo"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ServiceBusMessage setReplyTo(String replyTo)"
desc: "Sets the address of an entity to send replies to."
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.setReplyToSessionId(java.lang.String)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.setReplyToSessionId(String replyToSessionId)"
name: "setReplyToSessionId(String replyToSessionId)"
nameWithType: "ServiceBusMessage.setReplyToSessionId(String replyToSessionId)"
summary: "Gets or sets a session identifier augmenting the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getReplyTo()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ReplyTo\"></xref> address."
parameters:
- description: "The ReplyToGroupId property value of this message."
name: "replyToSessionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ServiceBusMessage setReplyToSessionId(String replyToSessionId)"
desc: "Gets or sets a session identifier augmenting the <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage.getReplyTo()\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ReplyTo\"></xref> address."
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.setScheduledEnqueueTime(java.time.OffsetDateTime)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime)"
name: "setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime)"
nameWithType: "ServiceBusMessage.setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime)"
summary: "Sets the scheduled enqueue time of this message."
parameters:
- description: "the datetime at which this message should be enqueued in Azure Service Bus."
name: "scheduledEnqueueTime"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html\">OffsetDateTime</a>"
syntax: "public ServiceBusMessage setScheduledEnqueueTime(OffsetDateTime scheduledEnqueueTime)"
desc: "Sets the scheduled enqueue time of this message. A `null` will not be set. If this value needs to be unset it could be done by value removing from <xref uid=\"com.azure.core.amqp.models.AmqpAnnotatedMessage.getMessageAnnotations*\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AmqpAnnotatedMessage#getMessageAnnotations()\"></xref> using key <xref uid=\"\" data-throw-if-not-resolved=\"false\" data-raw-source=\"AmqpMessageConstant#SCHEDULED_ENQUEUE_UTC_TIME_NAME\"></xref>."
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.setSessionId(java.lang.String)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.setSessionId(String sessionId)"
name: "setSessionId(String sessionId)"
nameWithType: "ServiceBusMessage.setSessionId(String sessionId)"
summary: "Sets the session identifier for a session-aware entity."
parameters:
- description: "The session identifier to be set."
name: "sessionId"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ServiceBusMessage setSessionId(String sessionId)"
desc: "Sets the session identifier for a session-aware entity."
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.setSubject(java.lang.String)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.setSubject(String subject)"
name: "setSubject(String subject)"
nameWithType: "ServiceBusMessage.setSubject(String subject)"
summary: "Sets the subject for the message."
parameters:
- description: "The application specific subject."
name: "subject"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ServiceBusMessage setSubject(String subject)"
desc: "Sets the subject for the message."
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref> object."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.setTimeToLive(java.time.Duration)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.setTimeToLive(Duration timeToLive)"
name: "setTimeToLive(Duration timeToLive)"
nameWithType: "ServiceBusMessage.setTimeToLive(Duration timeToLive)"
summary: "Sets the duration of time before this message expires."
parameters:
- description: "Time to Live duration of this message"
name: "timeToLive"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/time/Duration.html\">Duration</a>"
syntax: "public ServiceBusMessage setTimeToLive(Duration timeToLive)"
desc: "Sets the duration of time before this message expires."
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
- uid: "com.azure.messaging.servicebus.ServiceBusMessage.setTo(java.lang.String)"
fullName: "com.azure.messaging.servicebus.ServiceBusMessage.setTo(String to)"
name: "setTo(String to)"
nameWithType: "ServiceBusMessage.setTo(String to)"
summary: "Sets the \"to\" address."
parameters:
- description: "To property value of this message."
name: "to"
type: "<a href=\"https://docs.oracle.com/javase/8/docs/api/java/lang/String.html\">String</a>"
syntax: "public ServiceBusMessage setTo(String to)"
desc: "Sets the \"to\" address.\n\nThis property is reserved for future use in routing scenarios and presently ignored by the broker itself. Applications can use this value in rule-driven [auto-forward chaining][] scenarios to indicate the intended logical destination of the message.\n\n\n[auto-forward chaining]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-auto-forwarding"
returns:
description: "The updated <xref uid=\"com.azure.messaging.servicebus.ServiceBusMessage\" data-throw-if-not-resolved=\"false\" data-raw-source=\"ServiceBusMessage\"></xref>."
type: "<xref href=\"com.azure.messaging.servicebus.ServiceBusMessage?alt=com.azure.messaging.servicebus.ServiceBusMessage&text=ServiceBusMessage\" data-throw-if-not-resolved=\"False\" />"
type: "class"
desc: "The data structure encapsulating the message being sent to Service Bus. The message structure is discussed in detail in the [product documentation][].\n\n\n[product documentation]: https://docs.microsoft.com/azure/service-bus-messaging/service-bus-messages-payloads"
metadata: {}
package: "com.azure.messaging.servicebus"
artifact: com.azure:azure-messaging-servicebus:7.16.0