From 4b3608086ed1d4a650142802d431ec1f65094d96 Mon Sep 17 00:00:00 2001 From: Alex Cook Date: Thu, 15 Oct 2015 18:14:48 -0400 Subject: [PATCH 1/2] Update Makefiles to match other Messaging Toolkit samples. --- samples/KafkaConsistentRegionConsumerParallel/Makefile | 5 +---- samples/KafkaConsistentRegionConsumerSimple/Makefile | 5 +---- samples/KafkaParallelConsumers/Makefile | 5 +---- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/samples/KafkaConsistentRegionConsumerParallel/Makefile b/samples/KafkaConsistentRegionConsumerParallel/Makefile index d4a14ed..ef3d693 100644 --- a/samples/KafkaConsistentRegionConsumerParallel/Makefile +++ b/samples/KafkaConsistentRegionConsumerParallel/Makefile @@ -4,10 +4,7 @@ .PHONY: all clean TOOLKIT_NAME=com.ibm.streamsx.messaging -STREAMS_MESSAGING_TOOLKIT ?= $(shell ([ -e ../../$(TOOLKIT_NAME)/toolkit.xml ] && echo ../../$(TOOLKIT_NAME)) ||\ - echo $(STREAMS_STUDIO_SPL_PATH) ||\ - ([ -e "../$(TOOLKIT_NAME)" ] && echo ../$(TOOLKIT_NAME)) ||\ - echo $(STREAMS_INSTALL)/toolkits/$(TOOLKIT_NAME)) +STREAMS_MESSAGING_TOOLKIT ?= ../../com.ibm.streamsx.messaging:${STREAMS_INSTALL}/toolkits/com.ibm.streamsx.messaging SPLC_FLAGS ?= -a --data-directory data diff --git a/samples/KafkaConsistentRegionConsumerSimple/Makefile b/samples/KafkaConsistentRegionConsumerSimple/Makefile index c6d5521..2e1d690 100644 --- a/samples/KafkaConsistentRegionConsumerSimple/Makefile +++ b/samples/KafkaConsistentRegionConsumerSimple/Makefile @@ -4,10 +4,7 @@ .PHONY: all clean TOOLKIT_NAME=com.ibm.streamsx.messaging -STREAMS_MESSAGING_TOOLKIT ?= $(shell ([ -e ../../$(TOOLKIT_NAME)/toolkit.xml ] && echo ../../$(TOOLKIT_NAME)) ||\ - echo $(STREAMS_STUDIO_SPL_PATH) ||\ - ([ -e "../$(TOOLKIT_NAME)" ] && echo ../$(TOOLKIT_NAME)) ||\ - echo $(STREAMS_INSTALL)/toolkits/$(TOOLKIT_NAME)) +STREAMS_MESSAGING_TOOLKIT ?= ../../com.ibm.streamsx.messaging:${STREAMS_INSTALL}/toolkits/com.ibm.streamsx.messaging SPLC_FLAGS ?= -a --data-directory data diff --git a/samples/KafkaParallelConsumers/Makefile b/samples/KafkaParallelConsumers/Makefile index 874b313..2b30108 100644 --- a/samples/KafkaParallelConsumers/Makefile +++ b/samples/KafkaParallelConsumers/Makefile @@ -4,10 +4,7 @@ .PHONY: all clean TOOLKIT_NAME=com.ibm.streamsx.messaging -STREAMS_MESSAGING_TOOLKIT ?= $(shell ([ -e ../../$(TOOLKIT_NAME)/toolkit.xml ] && echo ../../$(TOOLKIT_NAME)) ||\ - echo $(STREAMS_STUDIO_SPL_PATH) ||\ - ([ -e "../$(TOOLKIT_NAME)" ] && echo ../$(TOOLKIT_NAME)) ||\ - echo $(STREAMS_INSTALL)/toolkits/$(TOOLKIT_NAME)) +STREAMS_MESSAGING_TOOLKIT ?= ../../com.ibm.streamsx.messaging:${STREAMS_INSTALL}/toolkits/com.ibm.streamsx.messaging SPLC_FLAGS ?= -a --data-directory data From 39958e111f33ba7b50e2ec60bf9606aa81d4c259 Mon Sep 17 00:00:00 2001 From: Alex Cook Date: Fri, 16 Oct 2015 18:02:44 -0400 Subject: [PATCH 2/2] Updating docs on messageAttribute, Makefile unused name removed. Updated non-kafka samples to work with current version number. --- build.xml | 24 +++++++++---------- .../messaging/kafka/KafkaBaseOper.java | 2 +- .../messaging/kafka/SimpleConsumerClient.java | 1 - samples/JMSSample/info.xml | 2 +- samples/JmsWithXmlParse/info.xml | 2 +- samples/JmsWithXmlParseBytes/info.xml | 2 +- .../Makefile | 1 - .../Makefile | 1 - samples/KafkaParallelConsumers/Makefile | 1 - samples/MqttSample/info.xml | 2 +- 10 files changed, 17 insertions(+), 21 deletions(-) diff --git a/build.xml b/build.xml index 667a536..e1bfca7 100644 --- a/build.xml +++ b/build.xml @@ -121,16 +121,16 @@ - - - - - - - + + + + + + + diff --git a/com.ibm.streamsx.messaging/impl/java/src/com/ibm/streamsx/messaging/kafka/KafkaBaseOper.java b/com.ibm.streamsx.messaging/impl/java/src/com/ibm/streamsx/messaging/kafka/KafkaBaseOper.java index 73387db..fb33776 100644 --- a/com.ibm.streamsx.messaging/impl/java/src/com/ibm/streamsx/messaging/kafka/KafkaBaseOper.java +++ b/com.ibm.streamsx.messaging/impl/java/src/com/ibm/streamsx/messaging/kafka/KafkaBaseOper.java @@ -114,7 +114,7 @@ public String getPropertiesFile() { return propertiesFile; } - @Parameter(optional = true, description = "Name of the attribute for the message. This attribute is required. Default is \\\"message\\\".") + @Parameter(optional = true, description = "Name of the attribute for the message. If this parameter is not specified, then by default the operator will look for an attribute named \\\"message\\\". If the \\\"message\\\" attribute is not found, messages will not be sent. Default is \\\"message\\\".") public void setMessageAttribute(String value) { messageAH.setName(value); } diff --git a/com.ibm.streamsx.messaging/impl/java/src/com/ibm/streamsx/messaging/kafka/SimpleConsumerClient.java b/com.ibm.streamsx.messaging/impl/java/src/com/ibm/streamsx/messaging/kafka/SimpleConsumerClient.java index 0f9d758..83b7d2f 100644 --- a/com.ibm.streamsx.messaging/impl/java/src/com/ibm/streamsx/messaging/kafka/SimpleConsumerClient.java +++ b/com.ibm.streamsx.messaging/impl/java/src/com/ibm/streamsx/messaging/kafka/SimpleConsumerClient.java @@ -58,7 +58,6 @@ public class SimpleConsumerClient implements StateHandler { private int fetchSize; private String clientName; protected Properties finalProperties = new Properties(); - private String charSet = "UTF-8"; private AttributeHelper topicAH = null, keyAH = null, messageAH = null; private int leaderConnectionRetries = 3; private int connectionRetryInterval = 1000; diff --git a/samples/JMSSample/info.xml b/samples/JMSSample/info.xml index 2492a5c..fe44c41 100644 --- a/samples/JMSSample/info.xml +++ b/samples/JMSSample/info.xml @@ -13,7 +13,7 @@ others. All Rights Reserved. com.ibm.streamsx.messaging - [2.0.0,3.0.0) + [2.0.0,4.0.0) \ No newline at end of file diff --git a/samples/JmsWithXmlParse/info.xml b/samples/JmsWithXmlParse/info.xml index fea9f27..e7c6f00 100644 --- a/samples/JmsWithXmlParse/info.xml +++ b/samples/JmsWithXmlParse/info.xml @@ -9,7 +9,7 @@ com.ibm.streamsx.messaging - [2.0.0,3.0.0) + [2.0.0,4.0.0) \ No newline at end of file diff --git a/samples/JmsWithXmlParseBytes/info.xml b/samples/JmsWithXmlParseBytes/info.xml index be6457d..2672d95 100644 --- a/samples/JmsWithXmlParseBytes/info.xml +++ b/samples/JmsWithXmlParseBytes/info.xml @@ -9,7 +9,7 @@ com.ibm.streamsx.messaging - [2.0.0,3.0.0) + [2.0.0,4.0.0) \ No newline at end of file diff --git a/samples/KafkaConsistentRegionConsumerParallel/Makefile b/samples/KafkaConsistentRegionConsumerParallel/Makefile index ef3d693..1b514f1 100644 --- a/samples/KafkaConsistentRegionConsumerParallel/Makefile +++ b/samples/KafkaConsistentRegionConsumerParallel/Makefile @@ -3,7 +3,6 @@ .PHONY: all clean -TOOLKIT_NAME=com.ibm.streamsx.messaging STREAMS_MESSAGING_TOOLKIT ?= ../../com.ibm.streamsx.messaging:${STREAMS_INSTALL}/toolkits/com.ibm.streamsx.messaging diff --git a/samples/KafkaConsistentRegionConsumerSimple/Makefile b/samples/KafkaConsistentRegionConsumerSimple/Makefile index 2e1d690..6fb5dd5 100644 --- a/samples/KafkaConsistentRegionConsumerSimple/Makefile +++ b/samples/KafkaConsistentRegionConsumerSimple/Makefile @@ -3,7 +3,6 @@ .PHONY: all clean -TOOLKIT_NAME=com.ibm.streamsx.messaging STREAMS_MESSAGING_TOOLKIT ?= ../../com.ibm.streamsx.messaging:${STREAMS_INSTALL}/toolkits/com.ibm.streamsx.messaging diff --git a/samples/KafkaParallelConsumers/Makefile b/samples/KafkaParallelConsumers/Makefile index 2b30108..ce399cd 100644 --- a/samples/KafkaParallelConsumers/Makefile +++ b/samples/KafkaParallelConsumers/Makefile @@ -3,7 +3,6 @@ .PHONY: all clean -TOOLKIT_NAME=com.ibm.streamsx.messaging STREAMS_MESSAGING_TOOLKIT ?= ../../com.ibm.streamsx.messaging:${STREAMS_INSTALL}/toolkits/com.ibm.streamsx.messaging diff --git a/samples/MqttSample/info.xml b/samples/MqttSample/info.xml index 5051c62..d73c1bd 100644 --- a/samples/MqttSample/info.xml +++ b/samples/MqttSample/info.xml @@ -9,7 +9,7 @@ com.ibm.streamsx.messaging - [2.0.0,3.0.0) + [2.0.0,4.0.0) \ No newline at end of file