test_class.declarator: CONNECTION = TestConstants.createConnectionWithAcknowledgements()
test_class.modifier: private static final
test_class.original_string: private static final Connection CONNECTION = TestConstants.createConnectionWithAcknowledgements();
test_class.type: Connection
test_class.var_name: CONNECTION
test_class.declarator: CONNECTION_ID = CONNECTION.getId()
test_class.modifier: private static final
test_class.original_string: private static final ConnectionId CONNECTION_ID = CONNECTION.getId();
test_class.type: ConnectionId
test_class.var_name: CONNECTION_ID
test_class.declarator: ackStates = new ConcurrentHashMap<>()
test_class.modifier: private final
test_class.original_string: private final ConcurrentMap<JmsAcknowledgeCallback, Integer> ackStates = new ConcurrentHashMap<>();
test_class.type: ConcurrentMap<JmsAcknowledgeCallback, Integer>
test_class.var_name: ackStates
test_class.declarator: jmsAcks = new LinkedBlockingQueue<>()
test_class.modifier: private final
test_class.original_string: private final BlockingQueue<Integer> jmsAcks = new LinkedBlockingQueue<>();
test_class.type: BlockingQueue<Integer>
test_class.var_name: jmsAcks
test_class.file: services/connectivity/messaging/src/test/java/org/eclipse/ditto/services/connectivity/messaging/amqp/AmqpConsumerActorTest.java
test_class.identifier: AmqpConsumerActorTest
test_class.superclass: extends AbstractConsumerActorTest<JmsMessage>
test_case.body: @Test
      public void plainStringMappingMultipleTest() {
          new TestKit(actorSystem) {{
              final MappingContext mappingContext = ConnectivityModelFactory.newMappingContext(
                      "JavaScript",
                      JavaScriptMessageMapperFactory.createJavaScriptMessageMapperConfigurationBuilder(
                              "plainStringMultiMapping", Collections.emptyMap())
                              .incomingScript(TestConstants.Mapping.INCOMING_MAPPING_SCRIPT
                                      // return array instead of single result object
                                      .replace("return msg;", "return [msg, msg, msg];"))
                              .outgoingScript(TestConstants.Mapping.OUTGOING_MAPPING_SCRIPT)
                              .build()
                              .getPropertiesAsJson()
              );
  
              final ActorRef processor = setupActor(getRef(), mappingContext);
  
              final Source source = Mockito.mock(Source.class);
              Mockito.when(source.getAuthorizationContext())
                      .thenReturn(TestConstants.Authorization.AUTHORIZATION_CONTEXT);
              Mockito.when(source.getPayloadMapping()).thenReturn(ConnectivityModelFactory.newPayloadMapping("test"));
              final ActorRef underTest = actorSystem.actorOf(AmqpConsumerActor.props(CONNECTION_ID,
                      consumerData("foo", Mockito.mock(MessageConsumer.class), source), processor, getRef()));
  
              final String plainPayload = "hello world!";
              final String correlationId = "cor-";
  
              underTest.tell(getJmsMessage(plainPayload, correlationId), null);
  
              for (int i = 0; i < 3; i++) {
                  final Command<?> command = expectMsgClass(Command.class);
                  assertThat(command.getType()).isEqualTo(ModifyAttribute.TYPE);
                  assertThat(command.getDittoHeaders().getCorrelationId()).contains(correlationId);
                  assertThat(((ModifyAttribute) command).getAttributePointer()).isEqualTo(JsonPointer.of("/foo"));
                  assertThat(((ModifyAttribute) command).getAttributeValue()).isEqualTo(JsonValue.of(plainPayload));
              }
          }};
      }
test_case.class_method_signature: AmqpConsumerActorTest.plainStringMappingMultipleTest()
test_case.full_signature: @Test public void plainStringMappingMultipleTest()
test_case.identifier: plainStringMappingMultipleTest
test_case.invocations: newMappingContext getPropertiesAsJson build outgoingScript incomingScript createJavaScriptMessageMapperConfigurationBuilder emptyMap replace setupActor getRef mock thenReturn when getAuthorizationContext thenReturn when getPayloadMapping newPayloadMapping actorOf props consumerData mock getRef tell getJmsMessage expectMsgClass isEqualTo assertThat getType contains assertThat getCorrelationId getDittoHeaders isEqualTo assertThat getAttributePointer of isEqualTo assertThat getAttributeValue of
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void plainStringMappingMultipleTest()
focal_class.declarator: ACTOR_NAME_PREFIX = "amqpConsumerActor-"
focal_class.modifier: static final
focal_class.original_string: static final String ACTOR_NAME_PREFIX = "amqpConsumerActor-";
focal_class.type: String
focal_class.var_name: ACTOR_NAME_PREFIX
focal_class.declarator: log = DittoLoggerFactory.getDiagnosticLoggingAdapter(this)
focal_class.modifier: private final
focal_class.original_string: private final DittoDiagnosticLoggingAdapter log = DittoLoggerFactory.getDiagnosticLoggingAdapter(this);
focal_class.type: DittoDiagnosticLoggingAdapter
focal_class.var_name: log
focal_class.declarator: headerEnforcementFilterFactory
focal_class.modifier: private final
focal_class.original_string: private final EnforcementFilterFactory<Map<String, String>, CharSequence> headerEnforcementFilterFactory;
focal_class.type: EnforcementFilterFactory<Map<String, String>, CharSequence>
focal_class.var_name: headerEnforcementFilterFactory
focal_class.declarator: messageRateLimiter
focal_class.modifier: private final
focal_class.original_string: private final MessageRateLimiter<String> messageRateLimiter;
focal_class.type: MessageRateLimiter<String>
focal_class.var_name: messageRateLimiter
focal_class.declarator: jmsActor
focal_class.modifier: private final
focal_class.original_string: private final ActorRef jmsActor;
focal_class.type: ActorRef
focal_class.var_name: jmsActor
focal_class.declarator: jmsActorAskTimeout
focal_class.modifier: private final
focal_class.original_string: private final Duration jmsActorAskTimeout;
focal_class.type: Duration
focal_class.var_name: jmsActorAskTimeout
focal_class.declarator: consumerData
focal_class.modifier: private
focal_class.original_string: private ConsumerData consumerData;
focal_class.type: ConsumerData
focal_class.var_name: consumerData
focal_class.declarator: messageConsumer
focal_class.modifier: @Nullable
      private
focal_class.original_string: @Nullable
      private MessageConsumer messageConsumer;
focal_class.type: MessageConsumer
focal_class.var_name: messageConsumer
focal_class.file: services/connectivity/messaging/src/main/java/org/eclipse/ditto/services/connectivity/messaging/amqp/AmqpConsumerActor.java
focal_class.identifier: AmqpConsumerActor
focal_class.interfaces: implements MessageListener, MessageRateLimiterBehavior<String>
focal_class.class_method_signature: AmqpConsumerActor.AmqpConsumerActor(final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)
focal_class.full_signature: @SuppressWarnings("unused") private  AmqpConsumerActor(final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)
focal_class.identifier: AmqpConsumerActor
focal_class.modifiers: @SuppressWarnings("unused") private
focal_class.parameters: (final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)
focal_class.signature:  AmqpConsumerActor(final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)
focal_class.class_method_signature: AmqpConsumerActor.props(final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)
focal_class.full_signature: static Props props(final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)
focal_class.identifier: props
focal_class.modifiers: static
focal_class.parameters: (final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)
focal_class.return: Props
focal_class.signature: Props props(final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)
focal_class.class_method_signature: AmqpConsumerActor.createReceive()
focal_class.full_signature: @Override public Receive createReceive()
focal_class.identifier: createReceive
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Receive
focal_class.signature: Receive createReceive()
focal_class.class_method_signature: AmqpConsumerActor.preStart()
focal_class.full_signature: @Override public void preStart()
focal_class.identifier: preStart
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void preStart()
focal_class.class_method_signature: AmqpConsumerActor.postStop()
focal_class.full_signature: @Override public void postStop()
focal_class.identifier: postStop
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void postStop()
focal_class.class_method_signature: AmqpConsumerActor.onMessage(final Message message)
focal_class.full_signature: @Override public void onMessage(final Message message)
focal_class.identifier: onMessage
focal_class.modifiers: @Override public
focal_class.parameters: (final Message message)
focal_class.return: void
focal_class.signature: void onMessage(final Message message)
focal_class.class_method_signature: AmqpConsumerActor.stopMessageConsumer()
focal_class.full_signature: private void stopMessageConsumer()
focal_class.identifier: stopMessageConsumer
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void stopMessageConsumer()
focal_class.class_method_signature: AmqpConsumerActor.startMessageConsumer()
focal_class.full_signature: private void startMessageConsumer()
focal_class.identifier: startMessageConsumer
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startMessageConsumer()
focal_class.class_method_signature: AmqpConsumerActor.stopMessageConsumerDueToRateLimit(final String reason)
focal_class.full_signature: @Override public void stopMessageConsumerDueToRateLimit(final String reason)
focal_class.identifier: stopMessageConsumerDueToRateLimit
focal_class.modifiers: @Override public
focal_class.parameters: (final String reason)
focal_class.return: void
focal_class.signature: void stopMessageConsumerDueToRateLimit(final String reason)
focal_class.class_method_signature: AmqpConsumerActor.startMessageConsumerDueToRateLimit()
focal_class.full_signature: @Override public void startMessageConsumerDueToRateLimit()
focal_class.identifier: startMessageConsumerDueToRateLimit
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startMessageConsumerDueToRateLimit()
focal_class.class_method_signature: AmqpConsumerActor.getMessageRateLimiter()
focal_class.full_signature: @Override public MessageRateLimiter<String> getMessageRateLimiter()
focal_class.identifier: getMessageRateLimiter
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: MessageRateLimiter<String>
focal_class.signature: MessageRateLimiter<String> getMessageRateLimiter()
focal_class.class_method_signature: AmqpConsumerActor.initMessageConsumer()
focal_class.full_signature: private void initMessageConsumer()
focal_class.identifier: initMessageConsumer
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initMessageConsumer()
focal_class.class_method_signature: AmqpConsumerActor.destroyMessageConsumer()
focal_class.full_signature: private void destroyMessageConsumer()
focal_class.identifier: destroyMessageConsumer
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void destroyMessageConsumer()
focal_class.class_method_signature: AmqpConsumerActor.matchesOwnConsumer(final ConsumerClosedStatusReport event)
focal_class.full_signature: private boolean matchesOwnConsumer(final ConsumerClosedStatusReport event)
focal_class.identifier: matchesOwnConsumer
focal_class.modifiers: private
focal_class.parameters: (final ConsumerClosedStatusReport event)
focal_class.return: boolean
focal_class.signature: boolean matchesOwnConsumer(final ConsumerClosedStatusReport event)
focal_class.class_method_signature: AmqpConsumerActor.handleConsumerClosed(final ConsumerClosedStatusReport event)
focal_class.full_signature: private void handleConsumerClosed(final ConsumerClosedStatusReport event)
focal_class.identifier: handleConsumerClosed
focal_class.modifiers: private
focal_class.parameters: (final ConsumerClosedStatusReport event)
focal_class.return: void
focal_class.signature: void handleConsumerClosed(final ConsumerClosedStatusReport event)
focal_class.class_method_signature: AmqpConsumerActor.messageConsumerCreated(final CreateMessageConsumerResponse response)
focal_class.full_signature: private void messageConsumerCreated(final CreateMessageConsumerResponse response)
focal_class.identifier: messageConsumerCreated
focal_class.modifiers: private
focal_class.parameters: (final CreateMessageConsumerResponse response)
focal_class.return: void
focal_class.signature: void messageConsumerCreated(final CreateMessageConsumerResponse response)
focal_class.class_method_signature: AmqpConsumerActor.messageConsumerFailed(final Status.Failure failure)
focal_class.full_signature: private void messageConsumerFailed(final Status.Failure failure)
focal_class.identifier: messageConsumerFailed
focal_class.modifiers: private
focal_class.parameters: (final Status.Failure failure)
focal_class.return: void
focal_class.signature: void messageConsumerFailed(final Status.Failure failure)
focal_class.class_method_signature: AmqpConsumerActor.handleJmsMessage(final JmsMessage message)
focal_class.full_signature: private void handleJmsMessage(final JmsMessage message)
focal_class.identifier: handleJmsMessage
focal_class.modifiers: private
focal_class.parameters: (final JmsMessage message)
focal_class.return: void
focal_class.signature: void handleJmsMessage(final JmsMessage message)
focal_class.class_method_signature: AmqpConsumerActor.acknowledge(final JmsMessage message, final boolean isSuccess, final boolean redeliver,
              final Map<String, String> externalMessageHeaders)
focal_class.full_signature: private void acknowledge(final JmsMessage message, final boolean isSuccess, final boolean redeliver,
              final Map<String, String> externalMessageHeaders)
focal_class.identifier: acknowledge
focal_class.modifiers: private
focal_class.parameters: (final JmsMessage message, final boolean isSuccess, final boolean redeliver,
              final Map<String, String> externalMessageHeaders)
focal_class.return: void
focal_class.signature: void acknowledge(final JmsMessage message, final boolean isSuccess, final boolean redeliver,
              final Map<String, String> externalMessageHeaders)
focal_class.class_method_signature: AmqpConsumerActor.extractPayloadFromMessage(final JmsMessage message,
              final ExternalMessageBuilder builder, @Nullable final String correlationId)
focal_class.full_signature: private ExternalMessageBuilder extractPayloadFromMessage(final JmsMessage message,
              final ExternalMessageBuilder builder, @Nullable final String correlationId)
focal_class.identifier: extractPayloadFromMessage
focal_class.modifiers: private
focal_class.parameters: (final JmsMessage message,
              final ExternalMessageBuilder builder, @Nullable final String correlationId)
focal_class.return: ExternalMessageBuilder
focal_class.signature: ExternalMessageBuilder extractPayloadFromMessage(final JmsMessage message,
              final ExternalMessageBuilder builder, @Nullable final String correlationId)
focal_class.class_method_signature: AmqpConsumerActor.extractHeadersMapFromJmsMessage(final JmsMessage message)
focal_class.full_signature: private Map<String, String> extractHeadersMapFromJmsMessage(final JmsMessage message)
focal_class.identifier: extractHeadersMapFromJmsMessage
focal_class.modifiers: private
focal_class.parameters: (final JmsMessage message)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> extractHeadersMapFromJmsMessage(final JmsMessage message)
focal_class.class_method_signature: AmqpConsumerActor.log()
focal_class.full_signature: @Override public DittoDiagnosticLoggingAdapter log()
focal_class.identifier: log
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: DittoDiagnosticLoggingAdapter
focal_class.signature: DittoDiagnosticLoggingAdapter log()
focal_class.superclass: extends BaseConsumerActor
focal_method.body: static Props props(final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor) {
  
          return Props.create(AmqpConsumerActor.class, connectionId, consumerData, messageMappingProcessor, jmsActor);
      }
focal_method.class_method_signature: AmqpConsumerActor.props(final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)
focal_method.full_signature: static Props props(final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)
focal_method.identifier: props
focal_method.invocations: create
focal_method.modifiers: static
focal_method.parameters: (final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)
focal_method.return: Props
focal_method.signature: Props props(final ConnectionId connectionId, final ConsumerData consumerData,
              final ActorRef messageMappingProcessor, final ActorRef jmsActor)