Sorry for posting a demo of an old version of QSF, the demo of the optimized 
QSF is as follows:


//message producer
@RestController
@RequestMapping("/demo/qsf")
@Slf4j
public class TestController {

    @QSFConsumer(topic = "rocketmq_topic_qsf_demo", methodSpecials = {
        @QSFConsumer.ConsumerMethodSpecial(methodName = "testQSFCallback", 
syncCall = true)
    })
    private QSFDemoService qsfDemoService;

    @GetMapping(("/basic"))
    public Map<String, String&gt; qsfBasic(HttpServletRequest request) {
        Map<String, String&gt; resultMap = new HashMap<&gt;();

        // test QSF basic usage
        qsfDemoService.testQSFBasic(100L, "hello world");

        return resultMap;
    }

    @GetMapping(("/idem"))
    public Map<String, String&gt; qsfIdempotency(HttpServletRequest request) {
        Map<String, String&gt; resultMap = new HashMap<&gt;();

        // test QSF idempotency, method with same parameters will be invoked 
exactly once
        qsfDemoService.testQSFIdempotency(100L, "hello world");
        qsfDemoService.testQSFIdempotency(100L, "hello world");

        return resultMap;
    }
}


// message consumer
@QSFProvider(consumerId = "rocketmq_consumer_qsf_demo", topic = 
"rocketmq_topic_qsf_demo")
@Slf4j
public class QSFDemoServiceImpl implements QSFDemoService {

    @Override
    public void testQSFBasic(long id, String name) {
        log.info("in service call: testQSFBasic id:{} name:{}", id, name);
    }

    @Override
    @QSFIdempotency(idempotentMethodExecuteTimeout = 1000)
    public void testQSFIdempotency(long id, String name) {
        log.info("in service call: testQSFIdempotency id:{} name:{}", id, name);
    }
}


------------------&nbsp;????????&nbsp;------------------
??????:                                                                         
                                               "Jason.Chen"                     
                                                               
<chenhua...@foxmail.com&gt;;
????????:&nbsp;2022??3??25??(??????) ????9:25
??????:&nbsp;"dev"<dev@rocketmq.apache.org&gt;;

????:&nbsp;?????? [DISCUSS] RIP-35 queue service framework(QSF)









------------------&nbsp;????????&nbsp;------------------
??????:                                                                         
                                               "Jason.Chen"                     
                                                               
<chenhua...@foxmail.com&gt;;
????????:&nbsp;2022??3??16??(??????) ????9:39
??????:&nbsp;"dev"<dev@rocketmq.apache.org&gt;;

????:&nbsp;?????? [DISCUSS] RIP-35 queue service framework(QSF)



Thanks Reply:)


QSF is a step further than rocketmq-spring. Using QSF, users can get the most 
intuitive experience that is almost identical to that of local method calls; 
moreover, QSF reserves a good extension capability, which can easily provide 
features such as idempotent, eventual consistency and flow control and so on.


For a simple usage example of QSF, please see the discussion above :)





------------------ ???????? ------------------
??????:                                                                         
                                               "dev"                            
                                                        
<duhengfore...@apache.org&gt;;
????????:&nbsp;2022??3??16??(??????) ????8:44
??????:&nbsp;"dev"<dev@rocketmq.apache.org&gt;;

????:&nbsp;Re: [DISCUSS] RIP-35 queue service framework(QSF)



Nice to see this proposal of yours, but it seems a bit like what
rocketmq-spring[1] does, so can you elaborate on the difference between QSF
and rocketmq-spring?

[1]https://github.com/apache/rocketmq-spring

yukon <yu...@apache.org&gt; ??2022??3??16?????? 20:23??????

&gt; Could you please provide some demos to show how we use
&gt; QSFProducer/Consumer?
&gt;
&gt; On Wed, Mar 16, 2022 at 6:49 PM Jason.Chen <chenhua...@foxmail.com&gt; 
wrote:
&gt;
&gt; &gt; I am sorry that the RIP mail format is incorrect, and i write a
&gt; &gt; well-formed google doc version here:
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; 
https://docs.google.com/document/d/10wSe24TAls7J9y0Ql4MYo73FX8g1aX9guoxBxzQhJgg
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; RIP 35 queue service framework(QSF)
&gt; &gt;
&gt; &gt; Status
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Current 
State: Proposed
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Authors: 
booom( booom (jason) ?? GitHub)
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Shepherds: 
yukon( zhouxinyu (yukon) ?? GitHub)
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Mailing List 
discussion: dev@rocketmq.apache.org
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Pull Request:
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; 
Released:&amp;nbsp;
&gt; &gt;
&gt; &gt; Background &amp;amp; Motivation
&gt; &gt;
&gt; &gt; What do we need to do
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Will we add a 
new module? Yes.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Will we add 
new APIs? No.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Will we add 
new feature? Yes.
&gt; &gt;
&gt; &gt; Why should we do that
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Are there any 
problems of our current project?
&gt; &gt;
&gt; &gt; The current mq client API is intrusive, to send message or consume
&gt; &gt; message, we should code to manage the mq infrastructure, and mixed it 
up
&gt; &gt; with our business logic codes.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; What can we 
benefit proposed changes?
&gt; &gt;
&gt; &gt; 1.&nbsp;&nbsp;&nbsp; &nbsp; Encapsulate mq client API to support 
method invoking style usage.
&gt; &gt;
&gt; &gt; 2.&nbsp;&nbsp;&nbsp; &nbsp; The encapsulation is easily extensible, 
to support
&gt; &gt; idempotence/eventually consistent/ fluid control extensions and so on.
&gt; &gt;
&gt; &gt; 3.&nbsp;&nbsp;&nbsp; &nbsp; Isolate the mq client manage code and the 
business logic code, to
&gt; &gt; help mq users improve their systems?? maintainability.
&gt; &gt;
&gt; &gt; Goals
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; What problem 
is this proposal designed to solve?
&gt; &gt;
&gt; &gt; Unobtrusive mq client usage, and easily extensible to support
&gt; &gt; idempotence/eventually consistent/ fluid control extensions and so on.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; To what 
degree should we solve the problem?
&gt; &gt;
&gt; &gt; 100%.
&gt; &gt;
&gt; &gt; Non-Goals
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; What problem 
is this proposal NOT designed to solve?
&gt; &gt;
&gt; &gt; 1.&nbsp;&nbsp;&nbsp; &nbsp; Add new features to classics mq client.
&gt; &gt;
&gt; &gt; 2.&nbsp;&nbsp;&nbsp; &nbsp; Affect compatibility.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Are there any 
limits of this proposal?
&gt; &gt;
&gt; &gt; Only QSF(queue service framework) users will benefit.
&gt; &gt;
&gt; &gt; Changes
&gt; &gt;
&gt; &gt; Architecture
&gt; &gt;
&gt; &gt; To simplify a process, we need to consider what information is 
essential
&gt; &gt; and must be provided by users to execute this process? How to properly
&gt; &gt; organize this information so that it is most user-friendly?&amp;nbsp;
&gt; &gt;
&gt; &gt;
&gt; &gt; Along this thinking path, we have extracted the necessary parameters 
for
&gt; &gt; mq calls and organized them into the java annotations @QSFConsumer and
&gt; &gt; @QSFProvider. After that, through the extension support of spring
&gt; container
&gt; &gt; in each stage of bean life cycle, we can process @QSFConsumer
&gt; @QSFProvider
&gt; &gt; annotation in BeanPostProcessor, extract method invocation 
information to
&gt; &gt; method invocation information object MethodInvokeInfo and send it out,
&gt; and
&gt; &gt; locate it through MethodInvokeInfo at the message receiving endpoint. 
The
&gt; &gt; bean where the call is made, the method where it is located, the
&gt; parameters
&gt; &gt; used, and then the method is called by reflection.
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; Interface Design/Change
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Method 
signature changes
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &amp;nbsp; 
&amp;nbsp; method name
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &amp;nbsp; 
&amp;nbsp; parameter list
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &amp;nbsp; 
&amp;nbsp; return value
&gt; &gt;
&gt; &gt; Nothing.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Method 
behavior changes
&gt; &gt;
&gt; &gt; Nothing.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; CLI command 
changes
&gt; &gt;
&gt; &gt; Nothing.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Log format or 
content changes
&gt; &gt;
&gt; &gt; Nothing.
&gt; &gt;
&gt; &gt; &amp;nbsp;Compatibility, Deprecation, and Migration Plan
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Are backward 
and forward compatibility taken into
&gt; &gt; consideration?
&gt; &gt;
&gt; &gt; Yes.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; Are there 
deprecated APIs?
&gt; &gt;
&gt; &gt; Nothing.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; How do we do 
migration?
&gt; &gt;
&gt; &gt; Upgrade normally, no additional migration required.
&gt; &gt;
&gt; &gt; Implementation Outline
&gt; &gt;
&gt; &gt; We will implement the proposed changes by 1 phase. (QSF is implemented
&gt; and
&gt; &gt; works well in our project)
&gt; &gt;
&gt; &gt; Phase 1
&gt; &gt;
&gt; &gt;
&gt; &gt; Complete the QSF mq client encapsulation.
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; Complete the QSF idempotency support
&gt; &gt;
&gt; &gt;
&gt; &gt; Rejected Alternatives
&gt; &gt;
&gt; &gt; There are no other alternatives.
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; ------------------&amp;nbsp;????????&amp;nbsp;------------------
&gt; &gt; ??????:
&gt; 
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 &nbsp; "Jason.Chen"
&gt; 
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 &nbsp; <
&gt; &gt; chenhua...@foxmail.com&amp;gt;;
&gt; &gt; ????????:&amp;nbsp;2022??3??16??(??????) ????12:55
&gt; &gt; ??????:&amp;nbsp;"dev"<dev@rocketmq.apache.org&amp;gt;;
&gt; &gt;
&gt; &gt; ????:&amp;nbsp;[DISCUSS] RIP-35 queue service framework(QSF)
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; Status
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Current State: Proposed
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Authors: booom( booom 
(jason) ?? GitHub)
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Shepherds: yukon( 
zhouxinyu (yukon) ?? GitHub)
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Mailing List discussion:
&gt; &gt; dev@rocketmq.apache.org
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Pull Request:
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Released: 
<relased_version&amp;gt;
&gt; &gt;
&gt; &gt; Background &amp;amp; Motivation
&gt; &gt;
&gt; &gt; What do we need to do
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Will we add a new module? 
Yes.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Will we add new APIs? No.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Will we add new feature? 
Yes.
&gt; &gt;
&gt; &gt; Why should we do that
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Are there any problems of 
our current project?
&gt; &gt;
&gt; &gt; The current mq client API is intrusive, to send message or consume
&gt; &gt; message, we should code to manage the mq infrastructure, and mixed it 
up
&gt; &gt; with our business logic codes.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; What can we benefit 
proposed changes?
&gt; &gt;
&gt; &gt; 1.&amp;nbsp;&amp;nbsp; &amp;nbsp; Encapsulate mq client API to 
support method
&gt; invoking
&gt; &gt; style usage.
&gt; &gt;
&gt; &gt; 2.&amp;nbsp;&amp;nbsp; &amp;nbsp; The encapsulation is easily 
extensible, to support
&gt; &gt; idempotence/eventually consistent/ fluid control extensions and so on.
&gt; &gt;
&gt; &gt; 3.&amp;nbsp;&amp;nbsp; &amp;nbsp; Isolate the mq client manage code 
and the business
&gt; &gt; logic code, to help mq users improve their systems?? maintainability.
&gt; &gt;
&gt; &gt; &amp;nbsp;
&gt; &gt;
&gt; &gt; Goals
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; What problem is this 
proposal designed to
&gt; solve?
&gt; &gt;
&gt; &gt; Unobtrusive mq client usage, and easily extensible to support
&gt; &gt; idempotence/eventually consistent/ fluid control extensions and so on.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; To what degree should we 
solve the problem?
&gt; &gt;
&gt; &gt; 100%.
&gt; &gt;
&gt; &gt; Non-Goals
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; What problem is this 
proposal NOT designed to
&gt; &gt; solve?
&gt; &gt;
&gt; &gt; 1.&amp;nbsp;&amp;nbsp; &amp;nbsp; Add new features to classics mq 
client.
&gt; &gt;
&gt; &gt; 2.&amp;nbsp;&amp;nbsp; &amp;nbsp; Affect compatibility.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Are there any limits of 
this proposal?
&gt; &gt;
&gt; &gt; Only QSF(queue service framework) users will benefit.
&gt; &gt;
&gt; &gt; Changes
&gt; &gt;
&gt; &gt; Architecture
&gt; &gt;
&gt; &gt; Interface Design/Change
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Method signature changes
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; method name
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; parameter list
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; return value
&gt; &gt;
&gt; &gt; Nothing.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Method behavior changes
&gt; &gt;
&gt; &gt; Nothing.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; CLI command changes
&gt; &gt;
&gt; &gt; Nothing.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Log format or content 
changes
&gt; &gt;
&gt; &gt; Nothing.
&gt; &gt;
&gt; &gt; &amp;nbsp;Compatibility, Deprecation, and Migration Plan
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Are backward and forward 
compatibility taken
&gt; &gt; into consideration?
&gt; &gt;
&gt; &gt; Yes.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; Are there deprecated APIs?
&gt; &gt;
&gt; &gt; Nothing.
&gt; &gt;
&gt; &gt; ??&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; How do we do migration?
&gt; &gt;
&gt; &gt; Upgrade normally, no additional migration required.
&gt; &gt;
&gt; &gt; Implementation Outline
&gt; &gt;
&gt; &gt; We will implement the proposed changes by 1 phase. (QSF is implemented
&gt; and
&gt; &gt; works well in our project)
&gt; &gt;
&gt; &gt; Phase 1
&gt; &gt;
&gt; &gt; Complete&nbsp;&nbsp;&nbsp; &nbsp; the QSF mq client encapsulation.
&gt; &gt;
&gt; &gt; Complete&nbsp;&nbsp;&nbsp; &nbsp; the QSF idempotency support
&gt; &gt;
&gt; &gt; Rejected Alternatives
&gt; &gt;
&gt; &gt; There are no other alternatives.
&gt;

Reply via email to