47.4. BindingComponent 사용

일부 바인딩에 이미 바인딩된 끝점을 만들 수 있는 종속성 주입을 통해 레지스트리에 구성할 수 있는 BindingComponent라는 구성 요소가 있습니다.There is a Component called BindingComponent which can be configured in your Registry by dependency injection which allows the creation of endpoints which are already bound to some binding.

예를 들어 다음과 같은 코드를 사용하여 레지스트리에 "jsonmq"라는 새 구성 요소를 등록한 경우

JacksonDataFormat format = new JacksonDataFormat(MyBean.class);
context.bind("jsonmq", new BindingComponent(new DataFormatBinding(format), "activemq:foo."));

그러면 끝점을 다른 끝점처럼 사용할 수 있습니다.

from("jsonmq:myQueue").to("jsonmq:anotherQueue")

큐us "foo.myQueue" 및 "foo.anotherQueue"를 사용하고 지정된 Jackson 데이터 형식을 대기열에서 마샬링하는 데 사용합니다.