Fix RSocket CloudEvents sample
This commit is contained in:
@@ -178,13 +178,6 @@ public final class CloudEventMessageBuilder<T> {
|
||||
else if (key.startsWith(CloudEventMessageUtils.KAFKA_ATTR_PREFIX)) {
|
||||
this.swapPrefix(key, CloudEventMessageUtils.KAFKA_ATTR_PREFIX, attributePrefixToUse);
|
||||
}
|
||||
// else if (key.equals(CloudEventMessageUtils._SPECVERSION) ||
|
||||
// key.equals(CloudEventMessageUtils._SOURCE) || key.equals(CloudEventMessageUtils._TYPE) ||
|
||||
// key.equals(CloudEventMessageUtils._DATASCHEMA) || key.equals(CloudEventMessageUtils._SCHEMAURL) ||
|
||||
// key.equals(CloudEventMessageUtils._SUBJECT) || key.equals(CloudEventMessageUtils._TIME) ||
|
||||
// key.equals(CloudEventMessageUtils._DATACONTENTTYPE)) {
|
||||
// this.swapPrefix(key, "", attributePrefixToUse);
|
||||
// }
|
||||
}
|
||||
}
|
||||
return doBuild(attributePrefixToUse);
|
||||
|
||||
@@ -389,14 +389,6 @@ public class RSocketAutoConfigurationTests {
|
||||
.as(StepVerifier::create)
|
||||
.expectComplete()
|
||||
.verify();
|
||||
|
||||
// applicationContext.getBean(SampleFunctionConfiguration.class).consumerData
|
||||
// .asMono()
|
||||
// .map(String::new)
|
||||
// .as(StepVerifier::create)
|
||||
// .expectNext("\"hello\"")
|
||||
// .expectComplete()
|
||||
// .verify();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.springframework.cloud.function.cloudevent.CloudEventMessageUtils;
|
||||
import org.springframework.kafka.annotation.KafkaListener;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.rsocket.RSocketRequester;
|
||||
import org.springframework.util.MimeTypeUtils;
|
||||
|
||||
|
||||
@SpringBootTest(properties = {"spring.rsocket.server.port=55555"})
|
||||
@@ -45,6 +46,7 @@ public class DemoApplicationTests {
|
||||
|
||||
this.rsocketRequesterBuilder.tcp("localhost", 55555)
|
||||
.route("hire")
|
||||
.metadata("{\"content-type\":\"application/cloudevents+json\"}", MimeTypeUtils.APPLICATION_JSON)
|
||||
.data(payload)
|
||||
.send()
|
||||
.subscribe();
|
||||
|
||||
Reference in New Issue
Block a user