rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject incubator-rocketmq-externals git commit: Init rocketmq-go client, closes apache/incubator-rocketmq-externals#10
Date Mon, 17 Apr 2017 08:17:36 GMT
Repository: incubator-rocketmq-externals
Updated Branches:
  refs/heads/master 950af6e96 -> 689ab3834


Init rocketmq-go client, closes apache/incubator-rocketmq-externals#10


Project: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/commit/689ab383
Tree: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/tree/689ab383
Diff: http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/diff/689ab383

Branch: refs/heads/master
Commit: 689ab38347bec50ed933fe8b41892983d0e455ee
Parents: 950af6e
Author: StyleTang <styletang.me@gmail.com>
Authored: Mon Apr 17 16:17:08 2017 +0800
Committer: yukon <yukon@apache.org>
Committed: Mon Apr 17 16:17:08 2017 +0800

----------------------------------------------------------------------
 rocketmq-go/docs/package.puml                   |  79 +++++++++
 rocketmq-go/docs/roadmap.md                     | 168 +++++++++++++++++++
 rocketmq-go/example/consumer_example.go         |  20 +++
 rocketmq-go/example/producer_example.go         |  17 ++
 rocketmq-go/model/config/consumer_config.go     |  21 +++
 rocketmq-go/model/config/producer_config.go     |  20 +++
 rocketmq-go/model/config/rocketmq_config.go     |  21 +++
 rocketmq-go/model/constant/message_constant.go  |  17 ++
 .../model/header/pull_message_request_header.go |  24 +++
 .../header/send_message_response_header.go      |  29 ++++
 rocketmq-go/model/send_result.go                |  20 +++
 rocketmq-go/mq_client_manager.go                |  36 ++++
 rocketmq-go/mq_consumer.go                      |  35 ++++
 rocketmq-go/mq_producer.go                      |  32 ++++
 rocketmq-go/remoting/custom_header.go           |  20 +++
 rocketmq-go/remoting/invoke_callback.go         |  20 +++
 rocketmq-go/remoting/remoting_client.go         |  30 ++++
 rocketmq-go/remoting/remoting_command.go        |  22 +++
 rocketmq-go/service/consume_messsage_service.go |  21 +++
 rocketmq-go/service/mq_client.go                |  21 +++
 rocketmq-go/service/offset_store_service.go     |  21 +++
 rocketmq-go/service/producer_service.go         |  26 +++
 rocketmq-go/service/rebalance_service.go        |  25 +++
 23 files changed, 745 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/docs/package.puml
----------------------------------------------------------------------
diff --git a/rocketmq-go/docs/package.puml b/rocketmq-go/docs/package.puml
new file mode 100644
index 0000000..9c78711
--- /dev/null
+++ b/rocketmq-go/docs/package.puml
@@ -0,0 +1,79 @@
+@startuml
+
+
+class rocketmq_go.MqClientManager{
+serviceState
+}
+class rocketmq_go.PullMessageController{
+
+}
+class rocketmq_go.ClientFactory{
+mqConsumerTable
+mqProducerTable
+}
+class service.MqConsumer{
+serviceState
+offsetStore
+}
+class service.MqProducer{
+serviceState
+ }
+ class service.MqClient{
+
+
+ }
+  class remoting.RemotingClient{
+   invokeSync
+   invokeAsync
+   invokeOneWay
+  }
+ class remoting.RemotingCommand{
+  customHeader
+  requestCode
+  responseCode
+ }
+  class remoting.ClientConfig{
+   nameSrvAddr
+   clientIP
+   instanceName
+  }
+namespace service{
+
+
+rocketmq_go.PullMessageController *-- rocketmq_go.ClientFactory:contains
+rocketmq_go.ClientFactory *-- MqProducer:contains
+rocketmq_go.ClientFactory *-- MqConsumer:contains
+MqProducer *-- service.MqClient :contains
+MqConsumer *-- service.MqClient : contains
+MqConsumer *-- service.OffsetStore : contains
+MqConsumer *-- service.Rebalance : contains
+MqConsumer *-- service.ConsumeMessageService : contains
+
+}
+
+namespace service{
+    MqClient o-- remoting.RemotingClient:contains
+    OffsetStore o-- MqClient
+    Rebalance o-- MqClient
+    Rebalance o-- OffsetStore
+    ConsumeMessageService o-- SendMessageBackProducerService
+    ConsumeMessageService o-- OffsetStore
+}
+
+namespace remoting {
+  RemotingClient  *-- RemotingCommand:contains
+  RemotingClient *-- ClientConfig:contains
+
+
+}
+
+namespace rocketmq_go{
+    MqClientManager o-- PullMessageController
+    MqClientManager o-- ClientFactory
+}
+
+
+note top of remoting.RemotingClient :(sync|aysc|oneWay)
+note top of remoting :net,serialize,connect,request response
+note top of service.MqClient :mq method
+@enduml
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/docs/roadmap.md
----------------------------------------------------------------------
diff --git a/rocketmq-go/docs/roadmap.md b/rocketmq-go/docs/roadmap.md
new file mode 100644
index 0000000..e6eabff
--- /dev/null
+++ b/rocketmq-go/docs/roadmap.md
@@ -0,0 +1,168 @@
+# RoadMap-Milestone1
+
+## Producer
+- [ ] ProducerType
+    - [ ] DefaultProducer
+- [ ] API
+    - [ ] Send
+        - [ ] Sync
+- [ ] Other
+    - [ ] DelayMessage
+    - [ ] Config
+    - [ ] MessageId Generate
+    - [ ] CompressMsg
+    - [ ] TimeOut
+    - [ ] LoadBalance
+    - [ ] DefaultTopic
+## Consumer
+- [ ] ConsumerType
+    - [ ] PushConsumer
+- [ ] MessageListener
+    - [ ] Concurrently
+- [ ] MessageModel
+    - [ ] CLUSTERING
+- [ ] OffsetStore
+    - [ ] RemoteBrokerOffsetStore
+- [ ] RebalanceService
+- [ ] PullMessageService
+- [ ] ConsumeMessageService
+- [ ] AllocateMessageQueueStrategy
+    - [ ] AllocateMessageQueueAveragely
+- [ ] Other
+    - [ ] Config
+    - [ ] ZIP
+    - [ ] ConsumeFromWhere
+        - [ ] CONSUME_FROM_LAST_OFFSET
+        - [ ] CONSUME_FROM_FIRST_OFFSET
+        - [ ] CONSUME_FROM_TIMESTAMP
+    - [ ] Retry(sendMessageBack)
+    - [ ] TimeOut(clearExpiredMessage)
+    - [ ] ACK(partSuccess)
+    - [ ] FlowControl(messageCanNotConsume)
+## Manager
+- [ ] Controller
+    - [ ] PullMessageController
+- [ ] Task
+    - [ ] Heartbeat
+    - [ ] UpdateTopicRouteInfoFromNameServer
+    - [ ] PersistAllConsumerOffset
+    - [ ] ClearExpiredMessage(form consumer consumeMessageService)
+
+
+## Remoting
+- [ ] MqClientRequest
+    - [ ] InvokeSync
+    - [ ] InvokeAsync
+    - [ ] InvokeOneWay
+- [ ] ClientRemotingProcessor
+    - [ ] NOTIFY_CONSUMER_IDS_CHANGED
+    - [ ] RESET_CONSUMER_CLIENT_OFFSET
+    - [ ] GET_CONSUMER_STATUS_FROM_CLIENT
+    - [ ] GET_CONSUMER_RUNNING_INFO
+    - [ ] CONSUME_MESSAGE_DIRECTLY
+- [ ] Serialize
+    - [ ] JSON
+    - [ ] ROCKETMQ
+- [ ] NamesrvAddrChoosed(HA)
+
+
+# RoadMap-ALL
+
+## Producer
+- [ ] ProducerType
+    - [ ] DefaultProducer
+    - [ ] TransactionProducer
+- [ ] API
+    - [ ] Send
+        - [ ] Sync
+        - [ ] Async
+        - [ ] OneWay
+- [ ] Other
+    - [ ] DelayMessage
+    - [ ] Config
+    - [ ] MessageId Generate
+    - [ ] CompressMsg
+    - [ ] TimeOut
+    - [ ] LoadBalance
+    - [ ] DefaultTopic
+    - [ ] VipChannel
+    - [ ] Retry
+    - [ ] SendMessageHook
+    - [ ] CheckRequestQueue
+    - [ ] CheckForbiddenHookList
+    - [ ] MQFaultStrategy
+
+
+
+## Consumer
+- [ ] ConsumerType
+    - [ ] PushConsumer
+    - [ ] PullConsumer
+- [ ] MessageListener
+    - [ ] Concurrently
+    - [ ] Orderly
+- [ ] MessageModel
+    - [ ] CLUSTERING
+    - [ ] BROADCASTING
+- [ ] OffsetStore
+    - [ ] RemoteBrokerOffsetStore
+        - [ ] many actions
+    - [ ] LocalFileOffsetStore
+- [ ] RebalanceService
+- [ ] PullMessageService
+- [ ] ConsumeMessageService
+- [ ] AllocateMessageQueueStrategy
+    - [ ] AllocateMessageQueueAveragely
+    - [ ] AllocateMessageQueueAveragelyByCircle
+    - [ ] AllocateMessageQueueByConfig
+    - [ ] AllocateMessageQueueByMachineRoom
+- [ ] Other
+    - [ ] Config
+    - [ ] ZIP
+    - [ ] AllocateMessageQueueStrategy
+    - [ ] ConsumeFromWhere
+        - [ ] CONSUME_FROM_LAST_OFFSET
+        - [ ] CONSUME_FROM_FIRST_OFFSET
+        - [ ] CONSUME_FROM_TIMESTAMP
+    - [ ] Retry(sendMessageBack)
+    - [ ] TimeOut(clearExpiredMessage)
+    - [ ] ACK(partSuccess)
+    - [ ] FlowControl(messageCanNotConsume)
+    - [ ] ConsumeMessageHook
+    - [ ] filterMessageHookList
+
+## Manager
+- [ ] Controller
+    - [ ] RebalanceController
+    - [ ] PullMessageController
+- [ ] Task
+    - [ ] PollNameServer
+    - [ ] Heartbeat
+    - [ ] UpdateTopicRouteInfoFromNameServer
+    - [ ] CleanOfflineBroker
+    - [ ] PersistAllConsumerOffset
+    - [ ] ClearExpiredMessage(form consumer consumeMessageService)
+    - [ ] UploadFilterClassSource(FromHeartBeat/But Golang Not Easy To do this(Java Source))
+
+
+## Remoting
+- [ ] MqClientRequest
+    - [ ] InvokeSync
+    - [ ] InvokeAsync
+    - [ ] InvokeOneWay
+- [ ] ClientRemotingProcessor
+    - [ ] CHECK_TRANSACTION_STATE
+    - [ ] NOTIFY_CONSUMER_IDS_CHANGED
+    - [ ] RESET_CONSUMER_CLIENT_OFFSET
+    - [ ] GET_CONSUMER_STATUS_FROM_CLIENT
+    - [ ] GET_CONSUMER_RUNNING_INFO
+    - [ ] CONSUME_MESSAGE_DIRECTLY
+- [ ] Serialize
+    - [ ] JSON
+    - [ ] ROCKETMQ
+- [ ] NamesrvAddrChoosed(HA)
+- [ ] Other
+    - [ ] VIPChannel
+    - [ ] RPCHook
+    
+    
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/example/consumer_example.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/example/consumer_example.go b/rocketmq-go/example/consumer_example.go
new file mode 100644
index 0000000..3595798
--- /dev/null
+++ b/rocketmq-go/example/consumer_example.go
@@ -0,0 +1,20 @@
+/*
+ * 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 example
+
+func main() {
+}

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/example/producer_example.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/example/producer_example.go b/rocketmq-go/example/producer_example.go
new file mode 100644
index 0000000..b64cdcd
--- /dev/null
+++ b/rocketmq-go/example/producer_example.go
@@ -0,0 +1,17 @@
+/*
+ * 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 example

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/model/config/consumer_config.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/model/config/consumer_config.go b/rocketmq-go/model/config/consumer_config.go
new file mode 100644
index 0000000..4622dae
--- /dev/null
+++ b/rocketmq-go/model/config/consumer_config.go
@@ -0,0 +1,21 @@
+/*
+ * 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 config
+
+type RocketMqConsumerConfig struct {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/model/config/producer_config.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/model/config/producer_config.go b/rocketmq-go/model/config/producer_config.go
new file mode 100644
index 0000000..b990c3c
--- /dev/null
+++ b/rocketmq-go/model/config/producer_config.go
@@ -0,0 +1,20 @@
+/*
+ * 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 config
+type RocketMqProducerConfig struct {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/model/config/rocketmq_config.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/model/config/rocketmq_config.go b/rocketmq-go/model/config/rocketmq_config.go
new file mode 100644
index 0000000..ac6e89f
--- /dev/null
+++ b/rocketmq-go/model/config/rocketmq_config.go
@@ -0,0 +1,21 @@
+/*
+ * 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 config
+type RocketMqClientConfig struct {
+
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/model/constant/message_constant.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/model/constant/message_constant.go b/rocketmq-go/model/constant/message_constant.go
new file mode 100644
index 0000000..93f23d0
--- /dev/null
+++ b/rocketmq-go/model/constant/message_constant.go
@@ -0,0 +1,17 @@
+/*
+ * 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 header

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/model/header/pull_message_request_header.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/model/header/pull_message_request_header.go b/rocketmq-go/model/header/pull_message_request_header.go
new file mode 100644
index 0000000..8d15500
--- /dev/null
+++ b/rocketmq-go/model/header/pull_message_request_header.go
@@ -0,0 +1,24 @@
+/*
+ * 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 header
+
+type PullMessageRequestHeader struct {
+}
+
+func (self *PullMessageRequestHeader) FromMap(headerMap map[string]interface{}) {
+	return
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/model/header/send_message_response_header.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/model/header/send_message_response_header.go b/rocketmq-go/model/header/send_message_response_header.go
new file mode 100644
index 0000000..8b40cdf
--- /dev/null
+++ b/rocketmq-go/model/header/send_message_response_header.go
@@ -0,0 +1,29 @@
+/*
+ * 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 header
+
+type SendMessageResponseHeader struct {
+	MsgId         string
+	QueueId       int32
+	QueueOffset   int64
+	TransactionId string
+	MsgRegion     string
+}
+
+func (self *SendMessageResponseHeader) FromMap(headerMap map[string]interface{}) {
+	return
+}

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/model/send_result.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/model/send_result.go b/rocketmq-go/model/send_result.go
new file mode 100644
index 0000000..fc18d6f
--- /dev/null
+++ b/rocketmq-go/model/send_result.go
@@ -0,0 +1,20 @@
+/*
+ * 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 model
+
+type SendResult struct {
+}

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/mq_client_manager.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/mq_client_manager.go b/rocketmq-go/mq_client_manager.go
new file mode 100644
index 0000000..153d955
--- /dev/null
+++ b/rocketmq-go/mq_client_manager.go
@@ -0,0 +1,36 @@
+/*
+ * 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 rocketmq_go
+
+import "github.com/incubator-rocketmq-externals/rocketmq-go/service"
+
+type MqClientManager struct {
+	clientFactory          *ClientFactory
+	rocketMqClient         service.RocketMqClient
+	pullMessageController  *PullMessageController
+	defaultProducerService RocketMQProducer //for send back message
+}
+
+type ClientFactory struct {
+	ProducerTable map[string]RocketMQProducer //group|RocketMQProducer
+	ConsumerTable map[string]RocketMQConsumer //group|Consumer
+}
+
+type PullMessageController struct {
+	rocketMqClient service.RocketMqClient
+	clientFactory  *ClientFactory
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/mq_consumer.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/mq_consumer.go b/rocketmq-go/mq_consumer.go
new file mode 100644
index 0000000..f143b9a
--- /dev/null
+++ b/rocketmq-go/mq_consumer.go
@@ -0,0 +1,35 @@
+/*
+ * 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 rocketmq_go
+
+import "github.com/incubator-rocketmq-externals/rocketmq-go/service"
+
+type RocketMQConsumer interface {
+}
+
+type MqConsumerConfig struct {
+
+}
+type DefaultMQPushConsumer struct {
+	offsetStore           service.OffsetStore //for consumer's offset
+	mqClient              service.RocketMqClient
+	rebalance             *service.Rebalance  //Rebalance's impl depend on offsetStore
+	consumeMessageService service.ConsumeMessageService
+	ConsumerConfig        *MqConsumerConfig
+}
+
+

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/mq_producer.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/mq_producer.go b/rocketmq-go/mq_producer.go
new file mode 100644
index 0000000..2a50344
--- /dev/null
+++ b/rocketmq-go/mq_producer.go
@@ -0,0 +1,32 @@
+/*
+ * 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 rocketmq_go
+
+import "github.com/incubator-rocketmq-externals/rocketmq-go/service"
+
+type RocketMQProducer interface {
+}
+
+type MqProducerConfig struct {
+
+}
+
+type DefaultMQProducer struct {
+	producerGroup   string
+	ProducerConfig  *MqProducerConfig
+	producerService service.ProducerService
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/remoting/custom_header.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/remoting/custom_header.go b/rocketmq-go/remoting/custom_header.go
new file mode 100644
index 0000000..ff1a6d4
--- /dev/null
+++ b/rocketmq-go/remoting/custom_header.go
@@ -0,0 +1,20 @@
+/*
+ * 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 remoting
+type CustomerHeader interface {
+	FromMap(headerMap map[string]interface{})
+}

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/remoting/invoke_callback.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/remoting/invoke_callback.go b/rocketmq-go/remoting/invoke_callback.go
new file mode 100644
index 0000000..844c304
--- /dev/null
+++ b/rocketmq-go/remoting/invoke_callback.go
@@ -0,0 +1,20 @@
+/*
+ * 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 remoting
+type ResponseFuture struct {
+}
+type InvokeCallback func(responseFuture *ResponseFuture)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/remoting/remoting_client.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/remoting/remoting_client.go b/rocketmq-go/remoting/remoting_client.go
new file mode 100644
index 0000000..a4ce83a
--- /dev/null
+++ b/rocketmq-go/remoting/remoting_client.go
@@ -0,0 +1,30 @@
+/*
+ * 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 remoting
+
+type DefalutRemotingClient struct {
+}
+
+func (self *DefalutRemotingClient) InvokeSync(addr string, request *RemotingCommand, timeoutMillis
int64) (remotingCommand *RemotingCommand, err error) {
+	return
+}
+func (self *DefalutRemotingClient)InvokeAsync(addr string, request *RemotingCommand, timeoutMillis
int64, invokeCallback InvokeCallback) error {
+	return
+}
+func (self *DefalutRemotingClient)InvokeOneWay(addr string, request *RemotingCommand, timeoutMillis
int64) error {
+	return
+}

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/remoting/remoting_command.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/remoting/remoting_command.go b/rocketmq-go/remoting/remoting_command.go
new file mode 100644
index 0000000..25d9645
--- /dev/null
+++ b/rocketmq-go/remoting/remoting_command.go
@@ -0,0 +1,22 @@
+/*
+ * 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 remoting
+
+type RemotingCommand struct {
+}
+
+

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/service/consume_messsage_service.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/service/consume_messsage_service.go b/rocketmq-go/service/consume_messsage_service.go
new file mode 100644
index 0000000..77a5d14
--- /dev/null
+++ b/rocketmq-go/service/consume_messsage_service.go
@@ -0,0 +1,21 @@
+/*
+ * 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 service
+
+type ConsumeMessageService struct {
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/service/mq_client.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/service/mq_client.go b/rocketmq-go/service/mq_client.go
new file mode 100644
index 0000000..f62766e
--- /dev/null
+++ b/rocketmq-go/service/mq_client.go
@@ -0,0 +1,21 @@
+/*
+ * 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 service
+
+type RocketMqClient interface {
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/service/offset_store_service.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/service/offset_store_service.go b/rocketmq-go/service/offset_store_service.go
new file mode 100644
index 0000000..302b412
--- /dev/null
+++ b/rocketmq-go/service/offset_store_service.go
@@ -0,0 +1,21 @@
+/*
+ * 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 service
+
+type OffsetStore struct {
+	mqClient RocketMqClient
+}

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/service/producer_service.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/service/producer_service.go b/rocketmq-go/service/producer_service.go
new file mode 100644
index 0000000..e3657a9
--- /dev/null
+++ b/rocketmq-go/service/producer_service.go
@@ -0,0 +1,26 @@
+/*
+ * 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 service
+
+import "github.com/incubator-rocketmq-externals/rocketmq-go/model/config"
+type ProducerService interface {
+}
+type DefaultProducerService struct {
+	producerGroup   string
+	producerConfig  *config.RocketMqProducerConfig
+	mqClient        RocketMqClient
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-rocketmq-externals/blob/689ab383/rocketmq-go/service/rebalance_service.go
----------------------------------------------------------------------
diff --git a/rocketmq-go/service/rebalance_service.go b/rocketmq-go/service/rebalance_service.go
new file mode 100644
index 0000000..bb97c87
--- /dev/null
+++ b/rocketmq-go/service/rebalance_service.go
@@ -0,0 +1,25 @@
+/*
+ * 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 service
+
+import "github.com/incubator-rocketmq-externals/rocketmq-go/model/config"
+
+type Rebalance struct {
+	mqClient       RocketMqClient
+	offsetStore    OffsetStore
+	consumerConfig config.RocketMqClientConfig
+}



Mime
View raw message