Remove XD references in SCSt code base

This commit is contained in:
Ilayaperumal Gopinathan
2016-03-03 22:27:52 +05:30
committed by Mark Pollack
parent cb73f26466
commit 6acb825ad5
6 changed files with 5 additions and 43 deletions

View File

@@ -38,6 +38,7 @@ import org.apache.kafka.common.serialization.ByteArraySerializer;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.cloud.stream.binder.AbstractBinder;
import org.springframework.cloud.stream.binder.Binder;
import org.springframework.cloud.stream.binder.BinderException;
import org.springframework.cloud.stream.binder.BinderHeaders;
import org.springframework.cloud.stream.binder.BinderPropertyKeys;
@@ -92,35 +93,7 @@ import kafka.utils.ZkUtils;
import scala.collection.Seq;
/**
* A binder that uses Kafka as the underlying middleware. The general implementation mapping between XD concepts
* and Kafka concepts is as follows:
* A binder that uses Kafka as the underlying middleware.
* The general implementation mapping between XD concepts and Kafka concepts is as follows:
* <table>
* <tr>
* <th>Stream definition</th><th>Kafka topic</th><th>Kafka partitions</th><th>Notes</th>
* </tr>
* <tr>
* <td>foo = "http | log"</td><td>foo.0</td><td>1 partition</td><td>1 producer, 1 consumer</td>
* </tr>
* <tr>
* <td>foo = "http | log", log.count=x</td><td>foo.0</td><td>x partitions</td><td>1 producer, x consumers with static
* group 'springXD', achieves queue semantics</td>
* </tr>
* <tr>
* <td>foo = "http | log", log.count=x + XD partitioning</td><td>still 1 topic 'foo.0'</td><td>x partitions + use key
* computed by XD</td><td>1 producer, x consumers with static group 'springXD', achieves queue semantics</td>
* </tr>
* <tr>
* <td>foo = "http | log", log.count=x, concurrency=y</td><td>foo.0</td><td>x*y partitions</td><td>1 producer, x XD
* consumers, each with y threads</td>
* </tr>
* <tr>
* <td>foo = "http | log", log.count=0, x actual log containers</td><td>foo.0</td><td>10(configurable)
* partitions</td><td>1 producer, x XD consumers. Can't know the number of partitions beforehand, so decide a number
* that better be greater than number of containers</td>
* </tr>
* </table>
* A {@link Binder} that uses Kafka as the underlying middleware.
*
* @author Eric Bottard
* @author Marius Bogoevici
@@ -326,7 +299,6 @@ public class KafkaMessageChannelBinder extends AbstractBinder<MessageChannel> {
@Override
public void onInit() throws Exception {
// we instantiate the connection factory here due to https://jira.spring.io/browse/XD-2647
ZookeeperConfiguration configuration = new ZookeeperConfiguration(this.zookeeperConnect);
configuration.setBufferSize(socketBufferSize);
configuration.setMaxWait(defaultMaxWait);

View File

@@ -149,7 +149,6 @@ public class RawModeKafkaBinderTests extends KafkaBinderTests {
.setHeader(IntegrationMessageHeaderAccessor.CORRELATION_ID, "foo")
.setHeader(IntegrationMessageHeaderAccessor.SEQUENCE_NUMBER, 42)
.setHeader(IntegrationMessageHeaderAccessor.SEQUENCE_SIZE, 43)
.setHeader("xdReplyChannel", "bar")
.build();
output.send(message2);
output.send(new GenericMessage<>(new byte[]{1}));

View File

@@ -469,11 +469,7 @@ public class RabbitMessageChannelBinder extends AbstractBinder<MessageChannel> {
private Binding<MessageChannel> doRegisterConsumer(final String name, String group, MessageChannel moduleInputChannel, Queue queue,
final RabbitPropertiesAccessor properties) {
DefaultBinding<MessageChannel> consumerBinding = null;
// Fix for XD-2503
// Temporarily overrides the thread context classloader with the one where the SimpleMessageListenerContainer
// is defined
// This allows for the proxying that happens while initializing the SimpleMessageListenerContainer to work
// correctly
// TODO https://github.com/spring-cloud/spring-cloud-stream/issues/401
ClassLoader originalClassloader = Thread.currentThread().getContextClassLoader();
try {
ClassUtils.overrideThreadContextClassLoader(SimpleMessageListenerContainer.class.getClassLoader());

View File

@@ -1,2 +0,0 @@
Spring XD Test Support
======================

View File

@@ -353,7 +353,7 @@ abstract public class PartitionCapableBinderTests extends BrokerBinderTests {
/**
* Implementations should return whether the binder under test uses "explicit" routing (e.g. Rabbit)
* whereby XD is responsible for assigning a partition and knows which exact consumer will receive the
* whereby Spring Cloud Stream is responsible for assigning a partition and knows which exact consumer will receive the
* message (i.e. honor "partitionIndex") or "implicit" routing (e.g. Kafka) whereby the only guarantee
* is that messages will be spread, but we don't control exactly which consumer gets which message.
*/

View File

@@ -26,10 +26,7 @@ import org.springframework.messaging.MessageHeaders;
* @author David Turanski
*/
public final class BinderHeaders {
/*
* no xd prefix for backwards compatibility
*/
public static final String BINDER_ORIGINAL_CONTENT_TYPE = "originalContentType";
/**