9.5. 메시지 헤더


Azure ServiceBus 구성 요소는 아래에 나열된 25 개의 메시지 헤더를 지원합니다.

Expand
이름설명Default유형

CamelAzureServiceBusApplicationProperties (common)

상수: APPLICATION_PROPERTIES

생산자와 소비자가 전송 및 수신한 메시지에 대해 각각 애플리케이션 속성(사용자 지정 속성이라고도 함)입니다.

 

map

CamelAzureServiceBusContentType (consumer)

상수: CONTENT_TYPE

메시지의 콘텐츠 형식을 가져옵니다.Gets the content type of the message.

 

문자열

CamelAzureServiceBusCorrelationId (consumer)

상수: CORRELATION_ID

상관 관계 식별자를 가져옵니다.

 

문자열

CamelAzureServiceBusDeadLetterErrorDescription (consumer)

일정: DEAD_LETTER_ERROR_DESCRIPTION

dead-lettered 메시지에 대한 설명을 가져옵니다.Gets the description for a message that has been dead-lettered.

 

문자열

CamelAzureServiceBusDeadLetterReason (consumer)

Constant: DEAD_LETTER_REASON

메시지가 dead-lettered인 이유를 가져옵니다.

 

문자열

CamelAzureServiceBusDeadLetterSource (consumer)

일정: DEAD_LETTER_SOURCE

이 메시지가 거부되기 전에 큐에 있는 큐 또는 서브스크립션의 이름을 가져옵니다.Gets the name of the queue or subscription that this message was enqueued on, before it was dead-lettered.

 

문자열

CamelAzureServiceBusDeliveryCount (consumer)

상수: DELIVERY_COUNT

이 메시지가 고객에게 전달되는 횟수를 가져옵니다.

 

long

CamelAzureServiceBusEnqueuedSequenceNumber (consumer)

일정: ENQUEUED_SEQUENCE_NUMBER

Service Bus의 메시지에 할당된 캡슐화된 시퀀스 번호를 가져옵니다.Gets the enqueued sequence number assigned to a message by Service Bus.

 

long

CamelAzureServiceBusEnqueuedTime (consumer)

상수: ENQUED_TIME

이 메시지가 Azure Service Bus에 큐에 추가된 10.0.0.1을 가져옵니다.Gets the 10.0.0.1 at which this message was enqueued in Azure Service Bus.

 

OffsetDateTime

CamelAzureServiceBusExpiresAt (consumer)

상수: EXPIRES_AT

이 메시지가 만료될 10.0.0.1을 가져옵니다.Gets the 10.0.0.1 at which this message will expire.

 

OffsetDateTime

CamelAzureServiceBusLockToken (consumer)

상수: LOCK_TOKEN

현재 메시지에 대한 잠금 토큰을 가져옵니다.

 

문자열

CamelAzureServiceBusLockedUntil (consumer)

상수: LOCKED_UNTIL

이 메시지의 잠금이 만료되는 10.0.0.1을 가져옵니다.Gets the 10.0.0.1 at which the lock of this message expires.

 

OffsetDateTime

CamelAzureServiceBusMessageId (consumer)

상수: MESSAGE_ID

메시지의 식별자를 가져옵니다.

 

문자열

CamelAzureServiceBusPartitionKey (consumer)

상수: PARTITION_KEY

메시지를 분할된 엔티티로 전송하기 위한 파티션 키를 가져옵니다.

 

문자열

CamelAzureServiceBusRawAmqpMessage (consumer)

Constant: RAW_AMQP_MESSAGE

AMQP 프로토콜에 정의된 메시지 표현입니다.

 

AmqpAnnotatedMessage

CamelAzureServiceBusReplyTo (consumer)

상수: REPLY_TO

응답을 보낼 엔터티 주소를 가져옵니다.Gets the address of an entity to send responses to.

 

문자열

CamelAzureServiceBusReplyToSessionId (consumer)

Constant: REPLY_TO_SESSION_ID

ReplyTo 주소를 보강하는 세션 식별자를 가져오거나 설정합니다.Gets or sets a session identifier augmenteding the ReplyTo address.

 

문자열

CamelAzureServiceBusSequenceNumber (consumer)

일정: SEQUENCE_NUMBER

Service Bus의 메시지에 할당된 고유 번호를 가져옵니다.

 

long

CamelAzureServiceBusSessionId (consumer)

상수: SESSION_ID

메시지의 세션 ID를 가져옵니다.

 

문자열

CamelAzureServiceBusSubject (consumer)

일정: SUBJECT

메시지의 제목을 가져옵니다.

 

문자열

CamelAzureServiceBusTimeToLive (consumer)

상수: TIME_TO_LIVE

이 메시지가 만료되기 전에 기간을 가져옵니다.

 

기간

CamelAzureServiceBusTo (consumer)

상수: TO

주소를 가져옵니다.Gets the to address.

 

문자열

CamelAzureServiceBusScheduledEnqueueTime (common)

일정:ECDHEULED_ENQUEUE_TIME

메시지가 Service Bus 큐 또는 항목에 표시되어야 하는 OffsetDateTime을 덮어씁니다. (consumer) 이 메시지의 예약된 enqueue 시간을 가져옵니다.

 

OffsetDateTime

CamelAzureServiceBusServiceBusTransactionContext (producer)

Constant: SERVICE_BUS_TRANSACTION_CONTEXT

서비스에서 트랜잭션을 덮어씁니다. 이 오브젝트에는 트랜잭션 ID만 포함됩니다.

 

ServiceBusTransactionContext

CamelAzureServiceBusProducerOperation (producer)

일정: PRODUCER_OPERATION

Producer에서 사용할 원하는 작업을 재정의합니다.

CloudEvent 값:

  • sendMessages
  • scheduleMessages
 

ServiceBusProducerOperationDefinition

9.5.1. 메시지 body

프로듀서에서 이 구성 요소는 문자열 유형 또는 List < String >의 메시지 본문을 수락하여 일괄 메시지를 보냅니다.

소비자에서 반환된 메시지 본문은 'String' 유형이 됩니다.

9.5.2. Azure ServiceBus Producer 작업

Expand
작업설명

sendMessages

일괄 처리 방법을 사용하여 서비스 버스 대기열 또는 항목에 일련의 메시지를 보냅니다.

scheduleMessages

이 발신자가 연결된 Azure Service Bus 엔티티에 예약된 메시지를 보냅니다. 예약된 메시지가 큐에 추가되어 예약된 enqueue 시간에만 수신자가 사용할 수 있습니다.

9.5.3. Azure ServiceBus 소비자 작업

Expand
작업설명

receiveMessages

Service Bus 엔티티에서 메시지의 <b>infinite</b> 스트림을 수신합니다.

peekMessages

수신자 또는 메시지 소스의 상태를 변경하지 않고 활성 메시지의 다음 배치를 읽습니다.

9.5.3.1. 예

  • sendMessages
from("direct:start")
  .process(exchange -> {
         final List<Object> inputBatch = new LinkedList<>();
            inputBatch.add("test batch 1");
            inputBatch.add("test batch 2");
            inputBatch.add("test batch 3");
            inputBatch.add(123456);

            exchange.getIn().setBody(inputBatch);
       })
  .to("azure-servicebus:test//?connectionString=test")
  .to("mock:result");
Copy to Clipboard Toggle word wrap
  • scheduleMessages
from("direct:start")
  .process(exchange -> {
         final List<Object> inputBatch = new LinkedList<>();
            inputBatch.add("test batch 1");
            inputBatch.add("test batch 2");
            inputBatch.add("test batch 3");
            inputBatch.add(123456);

            exchange.getIn().setHeader(ServiceBusConstants.SCHEDULED_ENQUEUE_TIME, OffsetDateTime.now());
            exchange.getIn().setBody(inputBatch);
       })
  .to("azure-servicebus:test//?connectionString=test&producerOperation=scheduleMessages")
  .to("mock:result");
Copy to Clipboard Toggle word wrap
  • receiveMessages
from("azure-servicebus:test//?connectionString=test")
  .log("${body}")
  .to("mock:result");
Copy to Clipboard Toggle word wrap
  • peekMessages
from("azure-servicebus:test//?connectionString=test&consumerOperation=peekMessages&peekNumMaxMessages=3")
  .log("${body}")
  .to("mock:result");
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat