Skip to content

Commit 2b8cb18

Browse files
committed
add missing attribute: partitionKey, viaPartitionKey
1 parent 9a3fd64 commit 2b8cb18

File tree

2 files changed

+72
-0
lines changed

2 files changed

+72
-0
lines changed

services/azure-servicebus/src/main/java/com/microsoft/windowsazure/services/servicebus/implementation/BrokerProperties.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ public class BrokerProperties {
3636
@JsonProperty("SessionId")
3737
private String sessionId;
3838

39+
@JsonProperty("PartitionKey")
40+
private String partitionKey;
41+
42+
@JsonProperty("ViaPartitionKey")
43+
private String viaPartitionKey;
44+
3945
@JsonProperty("DeliveryCount")
4046
private Integer deliveryCount;
4147

@@ -147,6 +153,24 @@ public void setSessionId(String sessionId) {
147153
this.sessionId = sessionId;
148154
}
149155

156+
@JsonIgnore
157+
public String getPartitionKey() {
158+
return partitionKey;
159+
}
160+
161+
public void setPartitionKey(String partitionKey) {
162+
this.partitionKey = partitionKey;
163+
}
164+
165+
@JsonIgnore
166+
public String getViaPartitionKey() {
167+
return partitionKey;
168+
}
169+
170+
public void setViaPartitionKey(String viaPartitionKey) {
171+
this.viaPartitionKey = viaPartitionKey;
172+
}
173+
150174
@JsonIgnore
151175
public String getLabel() {
152176
return label;

services/azure-servicebus/src/main/java/com/microsoft/windowsazure/services/servicebus/models/BrokeredMessage.java

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,54 @@ public BrokeredMessage setSessionId(String sessionId) {
349349
return this;
350350
}
351351

352+
/**
353+
* Returns the partition key for the message.
354+
*
355+
* @return A <code>String</code> object that represents the partition key.
356+
*
357+
*/
358+
public String getPartitionKey() {
359+
return brokerProperties.getPartitionKey();
360+
}
361+
362+
/**
363+
* Sets the partition key for the message.
364+
*
365+
* @param partitionKey
366+
* A <code>String</code> object that represents the partition key.
367+
*
368+
* @return A <code>Message</code> object that represents the updated
369+
* message.
370+
*/
371+
public BrokeredMessage setPartitionKey(String partitionKey) {
372+
brokerProperties.setPartitionKey(partitionKey);
373+
return this;
374+
}
375+
376+
/**
377+
* Returns the via partition key for the message.
378+
*
379+
* @return A <code>String</code> object that represents the via partition key.
380+
*
381+
*/
382+
public String getViaPartitionKey() {
383+
return brokerProperties.getViaPartitionKey();
384+
}
385+
386+
/**
387+
* Sets the via partition key for the message.
388+
*
389+
* @param viaPartitionKey
390+
* A <code>String</code> object that represents the via partition key.
391+
*
392+
* @return A <code>Message</code> object that represents the updated
393+
* message.
394+
*/
395+
public BrokeredMessage setViaPartitionKey(String viaPartitionKey) {
396+
brokerProperties.setViaPartitionKey(viaPartitionKey);
397+
return this;
398+
}
399+
352400
/**
353401
* Returns the label of the message.
354402
*

0 commit comments

Comments
 (0)