/** * * @param msgCommandChannel MsgCommandChannel arg used in * @param queueLength int arg specifying que length * @param maxMessageSize int arg specifying max message size */ public HTTPResponseService(MsgCommandChannel<?> msgCommandChannel, int queueLength, int maxMessageSize) { this.msgCommandChannel = msgCommandChannel; MsgCommandChannel.growCommandCountRoom(msgCommandChannel, queueLength); msgCommandChannel.initFeatures |= MsgCommandChannel.NET_RESPONDER; msgCommandChannel.pcm.ensureSize(ServerResponseSchema.class, queueLength, Math.max(minHeader, maxMessageSize)); assert(setupValidator()); }
public HTTPRequestService(MsgCommandChannel<?> msgCommandChannel, int queueLength, int maxMessageSize) { this.msgCommandChannel = msgCommandChannel; if (msgCommandChannel.builder.getHTTPClientConfig().isTLS()) { //TLS must have at lest 33305 int tlsBody = Math.max(SSLUtil.MinTLSBlock, maxMessageSize); int tlsLen = Math.max(Math.min(queueLength, (1<<27)/tlsBody),4); msgCommandChannel.pcm.ensureSize(ClientHTTPRequestSchema.class, tlsLen, tlsBody); } else { msgCommandChannel.pcm.ensureSize(ClientHTTPRequestSchema.class, queueLength, maxMessageSize); } MsgCommandChannel.growCommandCountRoom(msgCommandChannel, queueLength); msgCommandChannel.initFeatures |= MsgCommandChannel.NET_REQUESTER; }
public PubSubService(MsgCommandChannel<?> msgCommandChannel, int queueLength, int maxMessageSize) { this.msgCommandChannel = msgCommandChannel; MsgCommandChannel.growCommandCountRoom(msgCommandChannel, queueLength); msgCommandChannel.initFeatures |= MsgCommandChannel.DYNAMIC_MESSAGING; msgCommandChannel.pcm.ensureSize(MessagePubSub.class, queueLength, maxMessageSize); //also ensure consumers have pipes which can consume this. msgCommandChannel.pcm.ensureSize(MessageSubscription.class, queueLength, maxMessageSize); //IngressMessages Confirm that MQTT ingress is big enough as well msgCommandChannel.pcm.ensureSize(IngressMessages.class, queueLength, maxMessageSize); msgCommandChannel.builder.messageRoutingRequired(); }
public PubSubFixedTopicService(MsgCommandChannel<?> msgCommandChannel, String baseTopic, String trackTopic, int queueLength, int maxMessageSize) { msgCommandChannel.initFeatures |= MsgCommandChannel.DYNAMIC_MESSAGING; this.msgCommandChannel = msgCommandChannel; this.topic = trackTopic; this.topicBytes = topic.getBytes(); MsgCommandChannel.growCommandCountRoom(msgCommandChannel, queueLength); //NOTE: must set private topics in case we choose this msgCommandChannel.pcm.ensureSize(MessagePrivate.class, queueLength, maxMessageSize); //NOTE: must set public topics in case we choose this msgCommandChannel.pcm.ensureSize(MessagePubSub.class, queueLength, maxMessageSize); //also ensure consumers have pipes which can consume this. msgCommandChannel.pcm.ensureSize(MessageSubscription.class, queueLength, maxMessageSize); //IngressMessages Confirm that MQTT ingress is big enough as well msgCommandChannel.pcm.ensureSize(IngressMessages.class, queueLength, maxMessageSize); msgCommandChannel.builder.possiblePrivateTopicProducer(msgCommandChannel, baseTopic, msgCommandChannel.parallelInstanceId); }