AmqpItemReader和死信队列(AmqpItemReader and Dead Letter Queue)
我试图实现从队列中读取消息并在发生错误时将它们移动到死信的作业。 我试图使用事务处理的频道,但它总是重新发送消息。
有没有自动的方式来做到这一点与Spring批处理时,抛出异常?
I'm trying to implement a job that reads messages from a queue and move them to dead letter when an error occurs. I've tried to use a transacted channel but it always requeue the message.
Is there any automatic way to do that with Spring Batch when an exception is thrown?
原文:https://stackoverflow.com/questions/37490641
更新时间:2023-09-15 18:09
最满意答案
您将无法得到答案,因为您的代码工作正常(我只是删除了自定义元素):
https://jsfiddle.net/ferahl/4x34ae37/
var SignupComponent = React.createClass({ getInitialState: function(){ console.log('getInitialState'); return {} }, _onSubmit: function (e){ console.log('hello _onSubmit'); }, _onChange: function(){ console.log('hello _onChange'); }, render: function(){ return( <form ref='sugnup_form' onSubmit={this._onSubmit}> <div className="col-md-5"> <p className="h3">Signup Form</p> <input placeholder="Enter Your Name" name="user_name" onChange={this._onChange}/> <input placeholder="Enter Your Email" onChange={this._onChange} name="email"/> <input placeholder="Enter Your Password" name="password"/> <input className="btn btn-success" type="submit" value="Submit" /> </div> </form> ) } }); ReactDOM.render( <SignupComponent />, document.getElementById('container') );
You won't get answers to this because your code works fine (I just removed the custom elements):
https://jsfiddle.net/ferahl/4x34ae37/
var SignupComponent = React.createClass({ getInitialState: function(){ console.log('getInitialState'); return {} }, _onSubmit: function (e){ console.log('hello _onSubmit'); }, _onChange: function(){ console.log('hello _onChange'); }, render: function(){ return( <form ref='sugnup_form' onSubmit={this._onSubmit}> <div className="col-md-5"> <p className="h3">Signup Form</p> <input placeholder="Enter Your Name" name="user_name" onChange={this._onChange}/> <input placeholder="Enter Your Email" onChange={this._onChange} name="email"/> <input placeholder="Enter Your Password" name="password"/> <input className="btn btn-success" type="submit" value="Submit" /> </div> </form> ) } }); ReactDOM.render( <SignupComponent />, document.getElementById('container') );
相关问答
更多-
您将无法得到答案,因为您的代码工作正常(我只是删除了自定义元素): https://jsfiddle.net/ferahl/4x34ae37/ var SignupComponent = React.createClass({ getInitialState: function(){ console.log('getInitialState'); return {} }, _onSubmit: function (e){ console.log('hello _onSubmit' ...
-
你有PATH环境变量中的C:\Program Files\nodejs和C:\tools\python2吗? 过去我遇到过同样的问题: 无法创建Ignite-project Do you have C:\Program Files\nodejs and C:\tools\python2 in PATH-environmental variable? I had same kind of problems in the past: Cannot create Ignite-project
-
CheckBox仅在0.49版本中添加到React-Native中,并且仅适用于Android 。 这意味着如果您正在为iOS开发或无法升级您的应用程序版本 - 您将需要使用自定义复选框组件。 你可以查看这个新版本引入的所有变化: https : //github.com/facebook/react-native/releases/tag/v0.49.0 CheckBox has only been added into React-Native in version 0.49, and only for ...
-
您正在将boolean( loginStatus )与string进行比较。 删除引号,例如loginStatus == true ,并使用===而不是== 。 您也可以执行if(this.state.loginStatus) 。 You are comparing boolean (loginStatus) to string. Remove quotes, e.g. loginStatus == true and also use === instead of ==. You can also just ...
-
经过长时间的研究,这段代码可行。 在Route中用render={(props) => (
)}替换components={LoginInputs} 。 import React, { Component } from 'react' import { BrowserRouter as Router, Route, NavLink, Switch } from 'react-router-dom' import LoginInputs from "./loginIn ... -
onSubmit是 onSubmit is a prop for
-
你没有调用这个函数: 你也可以这样写: you didn't call the function:
React JS路由不起作用(React JS routing not working)[2022-04-01]
我必须建议运行你的生成应用程序,你可以使用wamp / xamp服务器,例如myapp.local 要么 您可以使用 npm install -g serve serve -s build 用于构建应用程序并在静态服务器5000端口上运行构建应用程序。 serve -h 欲了解更多详情,你可以检查上述命令。 I have to suggest for run your build app u can maka virtual host for that using wamp/xamp server e ...在示例中,他们使用元素。 当触发此表单中的输入提交时,将触发onSubmit事件。 这不适用于用Webform onSubmit在React中的输入上没有使用更多(Webform onSubmit not working with more that on input in React)[2023-07-07]
这是“浏览器” - 您无法使用回车键提交表单,也无法使用提交或按钮。 不,它不具体反应。 说实话,不知道为什么它与之合作 - 不确定那里的警告。 Anywho,Stackoverflow有很多关于解决这个问题的答案(当你删除作为问题的反应时): 在没有提交按钮的情况下按Enter键提交表单 This is "a browser thing" - you can't submit a form with the enter key and without a submit or button. No it's ...相关文章
更多- Hadoop mapred-queue-acls 配置
- Encoded Love-letter
- hdu---1591Encoded Love-letter
- B - Encoded Love-letter 字符串的处理
- RabbitMQ Work模式消息队列
- RabbitMQ 简单队列
- ActiveMQ中queues.jsp显示的队列信息
- RabbitMQ topic Exchange使用
- Storm【实践系列-如何写一个爬虫-】6 URLInjector
- java 监听redis过期key事件实现延迟队列功能
最新问答
更多- 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
- 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
- OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
- 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
- codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
- 在计算机拍照在哪里进入
- 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
- No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
- 单页应用程序:页面重新加载(Single Page Application: page reload)
- 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
- System.StackOverflow错误(System.StackOverflow error)
- KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
- 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
- android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
- TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
- 企业安全培训的各项内容
- 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
- C#类名中允许哪些字符?(What characters are allowed in C# class name?)
- NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
- 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
- 将多个行和可变行移动到列(moving multiple and variable rows to columns)
- 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
- 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
- Angular $资源不会改变方法(Angular $resource doesn't change method)
- 在Angular 5中不是一个函数(is not a function in Angular 5)
- 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
- 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
- 常见的python rpc和cli接口(Common python rpc and cli interface)
- Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
- 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)