我有一个非常简单的生产者类型程序,它试图将ByteMessage发送到一个主题。
我的程序收到错误com.solacesystems.jms.ConfigurationException: Error sending message - operation not supported on router (Cannot send assured message: Assured message delivery is not enabled on this channel.)
如何确保发送的邮件不是有保证的邮件?这是一些安慰配置变量吗?这是我试图使用的简单的JMS相关代码bytes
是我要发送的对象:
val connection = connectionFactory.createConnection()
val session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE)
val publishDestination = session.createTopic(solace.TOPIC)
val message = new SolBytesMessage()
message.writeBytes(bytes)
val producer = session.createProducer(publishDestination)
producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT)
log.info("Sending message")
producer.send(publishDestination, message)
答案 0 :(得分:0)
这可以通过强制QOS来解决:
JmsTemplate jmsTemplate = new JmsTemplate(cachingConnectionFactory);
jmsTemplate.setDefaultDestinationName(topic);
jmsTemplate.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
jmsTemplate.setExplicitQosEnabled(true);
答案 1 :(得分:-1)
请确认在设备的连接出厂设置中选中了int main()
{
char a[]="ATCG";
char *dna[20]; // <-- this was char dna[20]
char *dna1;
dna1 = (char *)malloc(2000);
int i, len_of_seg_2;
for(i = 0; i < strlen(a); i++)
{
len_of_seg_2=strlen(a)-i+1;
strncpy(dna1, a+i, len_of_seg_2);
dna1[len_of_seg_2-1]='\0';
dna[i]=dna1; // <-- this was the crash
printf("sequence:%s\n",dna1);
}
for(i=0;i<5;i++){
printf("\nseq:%s\n",dna[i]);
}
return 0;
}
。
连接工厂中的Direct Transport
设置控制用于非持久性消息的传输。