Details

    • Type: Wish
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.0-incubating
    • Component/s: None
    • Labels:
      None

      Description

      Add batch example

        Issue Links

          Activity

          Hide
          githubbot ASF GitHub Bot added a comment -

          GitHub user dongeforever opened a pull request:

          https://github.com/apache/incubator-rocketmq/pull/112

          ROCKETMQ-219 Add batch example

          https://issues.apache.org/jira/browse/ROCKETMQ-219

          @lizhanhui @zhouxinyu

          You can merge this pull request into a Git repository by running:

          $ git pull https://github.com/dongeforever/incubator-rocketmq ROCKETMQ-219

          Alternatively you can review and apply these changes as the patch at:

          https://github.com/apache/incubator-rocketmq/pull/112.patch

          To close this pull request, make a commit to your master/trunk branch
          with (at least) the following in the commit message:

          This closes #112


          commit 66f05cf36f61da1b0a2ee487bbb27ec88486be26
          Author: dongeforever <dongeforever@apache.org>
          Date: 2017-06-07T04:55:54Z

          ROCKETMQ-219 Add batch example


          Show
          githubbot ASF GitHub Bot added a comment - GitHub user dongeforever opened a pull request: https://github.com/apache/incubator-rocketmq/pull/112 ROCKETMQ-219 Add batch example https://issues.apache.org/jira/browse/ROCKETMQ-219 @lizhanhui @zhouxinyu You can merge this pull request into a Git repository by running: $ git pull https://github.com/dongeforever/incubator-rocketmq ROCKETMQ-219 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-rocketmq/pull/112.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #112 commit 66f05cf36f61da1b0a2ee487bbb27ec88486be26 Author: dongeforever <dongeforever@apache.org> Date: 2017-06-07T04:55:54Z ROCKETMQ-219 Add batch example
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user coveralls commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/112

          [![Coverage Status](https://coveralls.io/builds/11862558/badge)](https://coveralls.io/builds/11862558)

          Coverage decreased (-0.05%) to 38.628% when pulling *d1db5afa9ebf9490efb3d945bc782344d59deddf on dongeforever:ROCKETMQ-219* into *80791b6deb0e5a2ab4bc920f14f3a0e786587b53 on apache:develop*.

          Show
          githubbot ASF GitHub Bot added a comment - Github user coveralls commented on the issue: https://github.com/apache/incubator-rocketmq/pull/112 [! [Coverage Status] ( https://coveralls.io/builds/11862558/badge)](https://coveralls.io/builds/11862558 ) Coverage decreased (-0.05%) to 38.628% when pulling * d1db5afa9ebf9490efb3d945bc782344d59deddf on dongeforever: ROCKETMQ-219 * into * 80791b6deb0e5a2ab4bc920f14f3a0e786587b53 on apache:develop *.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user Jaskey commented on a diff in the pull request:

          https://github.com/apache/incubator-rocketmq/pull/112#discussion_r120535326

          — Diff: example/src/main/java/org/apache/rocketmq/example/batch/SplitBatchProducer.java —
          @@ -0,0 +1,97 @@
          +/*
          + * Licensed to the Apache Software Foundation (ASF) under one or more
          + * contributor license agreements. See the NOTICE file distributed with
          + * this work for additional information regarding copyright ownership.
          + * The ASF licenses this file to You under the Apache License, Version 2.0
          + * (the "License"); you may not use this file except in compliance with
          + * the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.rocketmq.example.batch;
          +
          +import java.util.ArrayList;
          +import java.util.Iterator;
          +import java.util.List;
          +import java.util.Map;
          +import org.apache.rocketmq.client.producer.DefaultMQProducer;
          +import org.apache.rocketmq.common.message.Message;
          +
          +public class SplitBatchProducer {
          — End diff –

          What about adding comments to this sample class to explain what it is going to demonstrate, since this example seem to be a little complicated.

          Show
          githubbot ASF GitHub Bot added a comment - Github user Jaskey commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/112#discussion_r120535326 — Diff: example/src/main/java/org/apache/rocketmq/example/batch/SplitBatchProducer.java — @@ -0,0 +1,97 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.rocketmq.example.batch; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import org.apache.rocketmq.client.producer.DefaultMQProducer; +import org.apache.rocketmq.common.message.Message; + +public class SplitBatchProducer { — End diff – What about adding comments to this sample class to explain what it is going to demonstrate, since this example seem to be a little complicated.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user lizhanhui commented on a diff in the pull request:

          https://github.com/apache/incubator-rocketmq/pull/112#discussion_r120554000

          — Diff: example/src/main/java/org/apache/rocketmq/example/batch/SplitBatchProducer.java —
          @@ -0,0 +1,97 @@
          +/*
          + * Licensed to the Apache Software Foundation (ASF) under one or more
          + * contributor license agreements. See the NOTICE file distributed with
          + * this work for additional information regarding copyright ownership.
          + * The ASF licenses this file to You under the Apache License, Version 2.0
          + * (the "License"); you may not use this file except in compliance with
          + * the License. You may obtain a copy of the License at
          + *
          + * http://www.apache.org/licenses/LICENSE-2.0
          + *
          + * Unless required by applicable law or agreed to in writing, software
          + * distributed under the License is distributed on an "AS IS" BASIS,
          + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
          + * See the License for the specific language governing permissions and
          + * limitations under the License.
          + */
          +
          +package org.apache.rocketmq.example.batch;
          +
          +import java.util.ArrayList;
          +import java.util.Iterator;
          +import java.util.List;
          +import java.util.Map;
          +import org.apache.rocketmq.client.producer.DefaultMQProducer;
          +import org.apache.rocketmq.common.message.Message;
          +
          +public class SplitBatchProducer {
          — End diff –

          Good to add a concise explanation why we should split when sending in batch. That is, total message size of messages in a batch cannot exceed 1 mega bytes on default.

          Show
          githubbot ASF GitHub Bot added a comment - Github user lizhanhui commented on a diff in the pull request: https://github.com/apache/incubator-rocketmq/pull/112#discussion_r120554000 — Diff: example/src/main/java/org/apache/rocketmq/example/batch/SplitBatchProducer.java — @@ -0,0 +1,97 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.rocketmq.example.batch; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import org.apache.rocketmq.client.producer.DefaultMQProducer; +import org.apache.rocketmq.common.message.Message; + +public class SplitBatchProducer { — End diff – Good to add a concise explanation why we should split when sending in batch. That is, total message size of messages in a batch cannot exceed 1 mega bytes on default.
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user lizhanhui commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/112

          Overall +1

          Show
          githubbot ASF GitHub Bot added a comment - Github user lizhanhui commented on the issue: https://github.com/apache/incubator-rocketmq/pull/112 Overall +1
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user zhouxinyu commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/112

          +1, LGTM~

          Show
          githubbot ASF GitHub Bot added a comment - Github user zhouxinyu commented on the issue: https://github.com/apache/incubator-rocketmq/pull/112 +1, LGTM~
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user vongosling commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/112

          +1

          Show
          githubbot ASF GitHub Bot added a comment - Github user vongosling commented on the issue: https://github.com/apache/incubator-rocketmq/pull/112 +1
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f45a1bcd2b42423050e6bd28c5fb92f5c47e263e in incubator-rocketmq's branch refs/heads/develop from dongeforever
          [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=f45a1bc ]

          ROCKETMQ-219 Add batch example, closes apache/incubator-rocketmq#112

          Show
          jira-bot ASF subversion and git services added a comment - Commit f45a1bcd2b42423050e6bd28c5fb92f5c47e263e in incubator-rocketmq's branch refs/heads/develop from dongeforever [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=f45a1bc ] ROCKETMQ-219 Add batch example, closes apache/incubator-rocketmq#112
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user dongeforever commented on the issue:

          https://github.com/apache/incubator-rocketmq/pull/112

          @zhouxinyu Thanks

          Show
          githubbot ASF GitHub Bot added a comment - Github user dongeforever commented on the issue: https://github.com/apache/incubator-rocketmq/pull/112 @zhouxinyu Thanks
          Hide
          githubbot ASF GitHub Bot added a comment -

          Github user dongeforever closed the pull request at:

          https://github.com/apache/incubator-rocketmq/pull/112

          Show
          githubbot ASF GitHub Bot added a comment - Github user dongeforever closed the pull request at: https://github.com/apache/incubator-rocketmq/pull/112
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f45a1bcd2b42423050e6bd28c5fb92f5c47e263e in incubator-rocketmq's branch refs/heads/release-4.1.0-incubating from dongeforever
          [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=f45a1bc ]

          ROCKETMQ-219 Add batch example, closes apache/incubator-rocketmq#112

          Show
          jira-bot ASF subversion and git services added a comment - Commit f45a1bcd2b42423050e6bd28c5fb92f5c47e263e in incubator-rocketmq's branch refs/heads/release-4.1.0-incubating from dongeforever [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=f45a1bc ] ROCKETMQ-219 Add batch example, closes apache/incubator-rocketmq#112
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f4be3bb929c99b9066759c9f02dc6d24045088cb in incubator-rocketmq's branch refs/heads/master from dongeforever
          [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=f4be3bb ]

          ROCKETMQ-219 Add batch example, closes apache/incubator-rocketmq#112

          Show
          jira-bot ASF subversion and git services added a comment - Commit f4be3bb929c99b9066759c9f02dc6d24045088cb in incubator-rocketmq's branch refs/heads/master from dongeforever [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=f4be3bb ] ROCKETMQ-219 Add batch example, closes apache/incubator-rocketmq#112
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit f4be3bb929c99b9066759c9f02dc6d24045088cb in incubator-rocketmq's branch refs/heads/develop from dongeforever
          [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=f4be3bb ]

          ROCKETMQ-219 Add batch example, closes apache/incubator-rocketmq#112

          Show
          jira-bot ASF subversion and git services added a comment - Commit f4be3bb929c99b9066759c9f02dc6d24045088cb in incubator-rocketmq's branch refs/heads/develop from dongeforever [ https://git-wip-us.apache.org/repos/asf?p=incubator-rocketmq.git;h=f4be3bb ] ROCKETMQ-219 Add batch example, closes apache/incubator-rocketmq#112

            People

            • Assignee:
              zander dongeforever
              Reporter:
              zander dongeforever
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development