{"action":"created","issue":{"url":"https://api.github.com/repos/rocketmq-baiji/rocketmq/issues/16","repository_url":"https://api.github.com/repos/rocketmq-baiji/rocketmq","labels_url":"https://api.github.com/repos/rocketmq-baiji/rocketmq/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/rocketmq-baiji/rocketmq/issues/16/comments","events_url":"https://api.github.com/repos/rocketmq-baiji/rocketmq/issues/16/events","html_url":"https://github.com/rocketmq-baiji/rocketmq/pull/16","id":352366125,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5Njk0Njk1","number":16,"title":"第7组第二、三题","user":{"login":"chudongfang","id":15171945,"node_id":"MDQ6VXNlcjE1MTcxOTQ1","avatar_url":"https://avatars1.githubusercontent.com/u/15171945?v=4","gravatar_id":"","url":"https://api.github.com/users/chudongfang","html_url":"https://github.com/chudongfang","followers_url":"https://api.github.com/users/chudongfang/followers","following_url":"https://api.github.com/users/chudongfang/following{/other_user}","gists_url":"https://api.github.com/users/chudongfang/gists{/gist_id}","starred_url":"https://api.github.com/users/chudongfang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chudongfang/subscriptions","organizations_url":"https://api.github.com/users/chudongfang/orgs","repos_url":"https://api.github.com/users/chudongfang/repos","events_url":"https://api.github.com/users/chudongfang/events{/privacy}","received_events_url":"https://api.github.com/users/chudongfang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-21T02:52:48Z","updated_at":"2018-08-21T03:13:07Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/rocketmq-baiji/rocketmq/pulls/16","html_url":"https://github.com/rocketmq-baiji/rocketmq/pull/16","diff_url":"https://github.com/rocketmq-baiji/rocketmq/pull/16.diff","patch_url":"https://github.com/rocketmq-baiji/rocketmq/pull/16.patch"},"body":"## What is the purpose of the change\r\n\r\nXXXXX\r\n\r\n## Brief changelog\r\n\r\nXX\r\n\r\n## Verifying this change\r\n\r\nXXXX\r\n\r\nFollow this checklist to help us incorporate your contribution quickly and easily. Notice, `it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR`.\r\n\r\n- [x] Make sure there is a [Github issue](https://github.com/apache/rocketmq/issues) filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue. \r\n- [x] Format the pull request title like `[ISSUE #123] Fix UnknownException when host config not exist`. Each commit in the pull request should have a meaningful subject line and body.\r\n- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.\r\n- [x] Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/rocketmq/tree/master/test).\r\n- [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. Run `mvn clean install -DskipITs` to make sure unit-test pass. Run `mvn clean test-compile failsafe:integration-test`  to make sure integration-test pass.\r\n- [ ] If this contribution is large, please file an [Apache Individual Contributor License Agreement](http://www.apache.org/licenses/#clas).\r\n"},"comment":{"url":"https://api.github.com/repos/rocketmq-baiji/rocketmq/issues/comments/414536040","html_url":"https://github.com/rocketmq-baiji/rocketmq/pull/16#issuecomment-414536040","issue_url":"https://api.github.com/repos/rocketmq-baiji/rocketmq/issues/16","id":414536040,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNDUzNjA0MA==","user":{"login":"treeandtree123","id":10769218,"node_id":"MDQ6VXNlcjEwNzY5MjE4","avatar_url":"https://avatars2.githubusercontent.com/u/10769218?v=4","gravatar_id":"","url":"https://api.github.com/users/treeandtree123","html_url":"https://github.com/treeandtree123","followers_url":"https://api.github.com/users/treeandtree123/followers","following_url":"https://api.github.com/users/treeandtree123/following{/other_user}","gists_url":"https://api.github.com/users/treeandtree123/gists{/gist_id}","starred_url":"https://api.github.com/users/treeandtree123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/treeandtree123/subscriptions","organizations_url":"https://api.github.com/users/treeandtree123/orgs","repos_url":"https://api.github.com/users/treeandtree123/repos","events_url":"https://api.github.com/users/treeandtree123/events{/privacy}","received_events_url":"https://api.github.com/users/treeandtree123/received_events","type":"User","site_admin":false},"created_at":"2018-08-21T03:13:07Z","updated_at":"2018-08-21T03:13:07Z","author_association":"NONE","body":"第七组\r\n针对非持久化的broker策略，关键两点在于putMessage和getMessage的实现。\r\n对于putMessage，在JVM中通过CopyOnWriteArrayList实现消息的同步非持久化存储，将消息存入到对应Topic、queueId的两层CurrentMap中，达到目标；\r\n对于getMessage，根据Topic、queueId取出对应的CopyOnWriteArrayList，再根据offset获取CopyOnWriteArrayList中所需的消息。\r\n\r\n本次针对非持久化Broker新建了三个文件：\r\n1. NonPersistentMessageStore：非持久化Broker的主要实现类；\r\n2. NonPersistentConsumeQueue：非持久化的消息对象，其内部实现了一个CopyOnWriteArrayList来非持久化存储对应Topic和queueId的消息；\r\n3. NonPersistentMsg：消息实体。"}}
{"actor":{"display_login":"treeandtree123"}}