This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch new-official-website
in repository https://gitbox.apache.org/repos/asf/rocketmq-site.git


The following commit(s) were added to refs/heads/new-official-website by this 
push:
     new cd59a3091 [ISSUE #334]Polish en docs code style (#335)
cd59a3091 is described below

commit cd59a309158ced90c02f962e1822a5b8ee81e4e6
Author: mxsm <[email protected]>
AuthorDate: Thu Jan 19 11:20:19 2023 +0800

    [ISSUE #334]Polish en docs code style (#335)
---
 .../current/02-producer/05message1.md                             | 6 +++---
 .../current/02-producer/06message2.md                             | 6 +++---
 .../current/02-producer/07message3.md                             | 2 +-
 .../current/02-producer/08message4.md                             | 2 +-
 .../current/02-producer/09message5.md                             | 4 ++--
 .../docusaurus-plugin-content-docs/current/03-consumer/12push.md  | 6 +++---
 .../docusaurus-plugin-content-docs/current/03-consumer/13pull.md  | 8 ++++----
 7 files changed, 17 insertions(+), 17 deletions(-)

diff --git 
a/i18n/en/docusaurus-plugin-content-docs/current/02-producer/05message1.md 
b/i18n/en/docusaurus-plugin-content-docs/current/02-producer/05message1.md
index 6c3ec354b..eddb62713 100644
--- a/i18n/en/docusaurus-plugin-content-docs/current/02-producer/05message1.md
+++ b/i18n/en/docusaurus-plugin-content-docs/current/02-producer/05message1.md
@@ -58,7 +58,7 @@ The entire code for synchronous sending is as follows:
 3. **Build the message**. Set the topic, tag, body, and so on. The tag can be 
understood as a label to categorize the message, and RocketMQ can filter the 
tag on the Consumer side.
 4. **Call the send() method to send the message**. Ultimately, the send() 
method will return a SendResult. The SendResut contains the actual send status 
including SEND_OK (send success), FLUSH_DISK_TIMEOUT (disk flush timeout), 
FLUSH_SLAVE_TIMEOUT (sync to slave timeout), SLAVE_NOT_AVAILABLE (slave can not 
be used), and an exception is thrown if it fails.
 
-``` javascript {16,15}
+``` java
 public class SyncProducer {
   public static void main(String[] args) throws Exception {
     // Initialize a producer and set the Producer group name
@@ -99,7 +99,7 @@ After sending a message, the sender does not need to wait for 
a response from th
 
 The following is the sample code.
 
-``` javascript {16,17}
+``` java
 public class AsyncProducer {
   public static void main(String[] args) throws Exception {
     // Initialize a producer and set the Producer group name
@@ -147,7 +147,7 @@ The only difference between asynchronous and synchronous 
sending methods is the
 
 The sender is only responsible for sending the message and does not wait for 
the server to return a response and no callback function is triggered, in other 
words, it only sends the request and does not wait for the answer. The process 
of sending messages in this way is very short, usually in the microsecond 
level. It is suitable for some scenarios where the time consumption is very 
short, but the reliability requirement is not high, such as log collection.
 
-``` javascript {16}
+``` java
 public class OnewayProducer {
   public static void main(String[] args) throws Exception{
     // Initialize a producer and set the Producer group name
diff --git 
a/i18n/en/docusaurus-plugin-content-docs/current/02-producer/06message2.md 
b/i18n/en/docusaurus-plugin-content-docs/current/02-producer/06message2.md
index 740466409..c95e99f0e 100644
--- a/i18n/en/docusaurus-plugin-content-docs/current/02-producer/06message2.md
+++ b/i18n/en/docusaurus-plugin-content-docs/current/02-producer/06message2.md
@@ -12,7 +12,7 @@ Ordered messages are also used in a wide range of application 
scenarios, such as
 
 The ordered message sample code is as follows:
 
-```jsx {13}
+```java
 public class Producer {
     public static void main(String[] args) throws UnsupportedEncodingException 
{
         try {
@@ -50,7 +50,7 @@ The difference here is mainly the call to the ```SendResult 
send(Message msg, Me
 :::tip
 MessageQueueSelector interface is as follows:
 
-```jsx
+```java
 public interface MessageQueueSelector {
     MessageQueue select(final List<MessageQueue> mqs, final Message msg, final 
Object arg);
 }
@@ -66,7 +66,7 @@ If a Broker drops out, does the total number of queues change 
at that point?
 
 If a change occurs, messages with the same ShardingKey will be sent to a 
different queue causing disorder. If no change occurs, messages will be sent to 
the queue of the offline Broker, which is bound to fail. Therefore, Apache 
RocketMQ provides two modes, to guarantee strict order over availability, 
create Topic by specifying the ```-o``` parameter (--order) to be true, which 
represents ordered messages:
 
-```shell {1}
+```shell
 $ sh bin/mqadmin updateTopic -c DefaultCluster -t TopicTest -o true -n 
127.0.0.1:9876
 create topic to 127.0.0.1:10911 success.
 TopicConfig [topicName=TopicTest, readQueueNums=8, writeQueueNums=8, perm=RW-, 
topicFilterType=SINGLE_TAG, topicSysFlag=0, order=true, attributes=null]
diff --git 
a/i18n/en/docusaurus-plugin-content-docs/current/02-producer/07message3.md 
b/i18n/en/docusaurus-plugin-content-docs/current/02-producer/07message3.md
index 416701b39..4b5d45d1d 100644
--- a/i18n/en/docusaurus-plugin-content-docs/current/02-producer/07message3.md
+++ b/i18n/en/docusaurus-plugin-content-docs/current/02-producer/07message3.md
@@ -18,7 +18,7 @@ Apache RocketMQ supports a total of 18 levels of delayed 
delivery, the details a
 
 The sample code for the delayed message sending is as follows:
 
-```javascript {10,11}
+```java
 public class ScheduledMessageProducer {
     public static void main(String[] args) throws Exception {
         // Instantiate a producer to send scheduled messages
diff --git 
a/i18n/en/docusaurus-plugin-content-docs/current/02-producer/08message4.md 
b/i18n/en/docusaurus-plugin-content-docs/current/02-producer/08message4.md
index deb29629e..d213eb322 100644
--- a/i18n/en/docusaurus-plugin-content-docs/current/02-producer/08message4.md
+++ b/i18n/en/docusaurus-plugin-content-docs/current/02-producer/08message4.md
@@ -4,7 +4,7 @@ In the case of certain requirements on throughput, Apache 
RocketMQ can send mess
 
 ![batch](../picture/batch.png)
 
-```javascript {10,11,12,13}
+```java
 public class SimpleBatchProducer {
 
     public static void main(String[] args) throws Exception {
diff --git 
a/i18n/en/docusaurus-plugin-content-docs/current/02-producer/09message5.md 
b/i18n/en/docusaurus-plugin-content-docs/current/02-producer/09message5.md
index fdb378f3f..597a0cfe9 100644
--- a/i18n/en/docusaurus-plugin-content-docs/current/02-producer/09message5.md
+++ b/i18n/en/docusaurus-plugin-content-docs/current/02-producer/09message5.md
@@ -33,7 +33,7 @@ The procedure of the transaction status check are as follows.
 
 ## Example
 
-```javascript {39}
+```java
 public class TransactionProducer {
     public static void main(String[] args) throws MQClientException, 
InterruptedException {
         TransactionListener transactionListener = new 
TransactionListenerImpl();
@@ -112,7 +112,7 @@ Transactional messages are no longer sent by 
DefaultMQProducer, but using `Trans
 
 The TransactionListener interface is defined as follows:
 
-````javascript {9,18}
+````java
 public interface TransactionListener {
     /**
      * When send transactional prepare(half) message succeed, this method will 
be invoked to execute local transaction.
diff --git 
a/i18n/en/docusaurus-plugin-content-docs/current/03-consumer/12push.md 
b/i18n/en/docusaurus-plugin-content-docs/current/03-consumer/12push.md
index d873fdeee..7a6498102 100644
--- a/i18n/en/docusaurus-plugin-content-docs/current/03-consumer/12push.md
+++ b/i18n/en/docusaurus-plugin-content-docs/current/03-consumer/12push.md
@@ -2,7 +2,7 @@
 
 The simple code of RocketMQ Push Consumer is as follows:
 
-```javascript
+```java
 public class Consumer {
   public static void main(String[] args) throws InterruptedException, 
MQClientException {
     // Initialize Consumer and set Consumer Goup Name
@@ -31,7 +31,7 @@ public class Consumer {
 First, initialize the consumer.  When initializing the consumer, the consumer 
must with the ConsumerGroupName, the ConsumerGroupName of the same consumer 
group is the same, which is an important attribute to determine whether the 
consumer belongs to the same consumer group. Then, set the NameServer address, 
which is not introduced here as like Producer. Then, call the subscribe method 
to subscribe to Topic. The subscribe method needs to specify the Topic name 
needed to subscribe to, it c [...]
 
 :::note  MessageListenerConcurrently Interface
-```javascript 
+```java
 /**
  * A MessageListenerConcurrently object is used to receive asynchronously 
delivered messages concurrently
  */
@@ -73,7 +73,7 @@ Setting up Push Consumer concurrent consumption has been 
described above and is
 
 RocketMQ therefore provides a order consumption approach. The only difference 
between order consumption setup and concurrent consumption at the API level is 
that the implementation of the MessageListenerOrderly interface is passed in 
when registering the consumption callback interface.
 
-```javascript
+```java
 consumer.registerMessageListener(new MessageListenerOrderly() {
             AtomicLong consumeTimes = new AtomicLong(0);
             @Override
diff --git 
a/i18n/en/docusaurus-plugin-content-docs/current/03-consumer/13pull.md 
b/i18n/en/docusaurus-plugin-content-docs/current/03-consumer/13pull.md
index 05208c7b9..b783c33df 100644
--- a/i18n/en/docusaurus-plugin-content-docs/current/03-consumer/13pull.md
+++ b/i18n/en/docusaurus-plugin-content-docs/current/03-consumer/13pull.md
@@ -6,7 +6,7 @@ There are two kinds of Pull methods in RocketMQ. `Pull 
Consumer` is the more pri
 
 The Pull Consumer example is as follows:
 
-```javascript
+```java
 public class PullConsumerTest {
   public static void main(String[] args) throws MQClientException {
     DefaultMQPullConsumer consumer = new 
DefaultMQPullConsumer("please_rename_unique_group_name_5");
@@ -39,7 +39,7 @@ Set<MessageQueue> queueSet =  
consumer.fetchSubscribeMessageQueues("TopicTest");
 
 After finding or constructing the queue, call the pull method to start 
pulling. The parameters such as the queue to be pulled, the filter expression, 
the offset to be pulled, and the maximum number of messages to be pulled should 
be passed in it. The `PullResult` will be returned after the operation is 
completed, and the PullStatus in the PullResult indicates the result status, as 
shown below:
 
-```javascript
+```java
 public enum PullStatus {
     /**
      * Founded
@@ -66,7 +66,7 @@ FOUND means the message was pulled, NO_NEW_MSG means no new 
message was found, N
 
 Lite Pull Consumer is a Pull Consumer introduced in RocketMQ 4.6.0, which is 
simpler to use than the original Pull Consumer and provides two modes, 
Subscribe and Assign. The Subscribe mode example is as follows:
 
-```javascript
+```java
 public class LitePullConsumerSubscribe {
     public static volatile boolean running = true;
     public static void main(String[] args) throws Exception {
@@ -90,7 +90,7 @@ First of all, initialize `DefaultLitePullConsumer` and set 
`ConsumerGroupName`.
 
 The following is an example of the Assign mode:
 
-```javascript
+```java
 public class LitePullConsumerAssign {
     public static volatile boolean running = true;
     public static void main(String[] args) throws Exception {

Reply via email to