用于Spring集成的Java 7 DSL表示“int-jms:message-driven-channel-adapter”

时间:2015-08-31 16:32:34

标签: spring-integration

我有使用spring integration config从IBM MQ读取消息的代码,如下所示。我需要使用Spring集成注释转换为Java 7 DSL。

                                                                       

// Rotation metadata to apply to the preview stream and recorded videos (MF_MT_VIDEO_ROTATION)
// Reference: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868174.aspx
readonly Guid RotationKey = new Guid("C380465D-2271-428C-9B83-ECEA3B4A85C1");

// Add rotation metadata to the preview stream to make sure the aspect ratio / dimensions match when rendering and getting preview frames
var props = _mediaCapture.VideoDeviceController.GetMediaStreamProperties(MediaStreamType.VideoPreview);
props.Properties.Add(RotationKey, rotationDegrees);
await _mediaCapture.SetEncodingPropertiesAsync(MediaStreamType.VideoPreview, props, null);

1 个答案:

答案 0 :(得分:1)

如果您想使用Java DSL,请参阅reference manual

使用Jms工厂类

IntegrationFlows.from(Jms.messageDriven...)
                .handle(...)
                .get();

如果您只想使用注释,请参阅Spring Integration reference manual

消息驱动的适配器只是类型@Bean的{​​{1}},它获取一个侦听器容器和一个JmsMessageDrivenEndpoint