Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@ public class ConsumerSetting {
private String implClass;

public void afterProperties() {
Assert.notNull(queue, "A property 'queue' of consumer setting isn't specified");
Assert.notNull(implClass, "A property 'implClass' of consumer setting isn't specified");
Assert.notNull(queue, "A property 'queue' of consumer setting isn't specified.");
Assert.notNull(implClass, "A property 'implClass' of consumer setting isn't specified.");
Assert.isTrue(pollSize == null || pollSize > 0, "A property 'pollSize' of consumer setting must be greater than 0.");
Assert.isTrue(pollInterval == null || pollInterval >= 0, "A property 'pollInterval' of consumer setting must not be negative.");
Assert.isTrue(consumerNum == null || consumerNum > 0, "A property 'consumerNum' of consumer setting must be greater than 0.");
name = name != null ? name : queue;
groupName = groupName != null ? groupName : "default";
prefix = prefix != null ? prefix : "queue:";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ public class ProducerSetting {
private Integer nodeId;

public void afterProperties() {
Assert.notNull(queue, "A property 'queue' of producer setting isn't specified.");
Assert.notNull(implClass, "A property 'implClass' of producer setting isn't specified.");
Assert.isTrue(nodeId == null || nodeId < 16383, "A property 'nodeId' of producer setting must less than 16383.");
Assert.notNull(queue, "A property 'queue' of producer setting isn't specified.");
Assert.notNull(implClass, "A property 'implClass' of producer setting isn't specified.");
Assert.isTrue(nodeId == null || (nodeId >= 0 && nodeId <= 16383), "A property 'nodeId' of producer setting must be between 0 and 16383.");
Assert.isTrue(reserveDays >= 0, "A property 'reserveDays' of producer setting must not be negative.");
name = name != null ? name : queue;
prefix = prefix != null ? prefix : "queue:";
serializer = serializer != null ? serializer : "json";
Expand Down