azure-communication-chat-java
यह क्या करती है
यह टूल रियल-टाइम चैट ऐप्स बनाने और मैनेज करने देता है। आप लोगों को जोड़ सकते हैं, मैसेज भेज सकते हैं (टेक्स्ट या HTML), देख सकते हैं किसने मैसेज पढ़ा है, और पता लगा सकते हैं कि कोई टाइप कर रहा है।
कब इस्तेमाल करें
- ✓दोस्तों के ग्रुप के लिए चैट बनाते समय।
- ✓किसी ऐप के लिए मैसेजिंग सिस्टम डेवलप करते समय।
- ✓कस्टमर सपोर्ट के लिए वेबसाइट पर चैट लगाते समय।
Skill का लिंक
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/azure-communication-chat-java/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“'Project Meeting' नाम की चैट बनाओ जिसमें Alice और Bob हों, और Alice की तरफ से 'Hello everyone!' मैसेज भेजो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
चैट सर्विस से जुड़ने के लिए आप एक खास कोड (जिसे 'client' कहते हैं) इस्तेमाल करते हैं। इस कोड से आप चैट रूम बना सकते हैं, सदस्य जोड़ सकते हैं और मैसेज भेज व पा सकते हैं।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Azure Communication Chat (Java)
Build real-time chat applications with thread management, messaging, participants, and read receipts.
Installation
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-communication-chat</artifactId>
<version>1.6.0</version>
</dependency>
Client Creation
import com.azure.communication.chat.ChatClient;
import com.azure.communication.chat.ChatClientBuilder;
import com.azure.communication.chat.ChatThreadClient;
import com.azure.communication.common.CommunicationTokenCredential;
// ChatClient requires a CommunicationTokenCredential (user access token)
String endpoint = "https://<resource>.communication.azure.com";
String userAccessToken = "<user-access-token>";
CommunicationTokenCredential credential = new CommunicationTokenCredential(userAccessToken);
ChatClient chatClient = new ChatClientBuilder()
.endpoint(endpoint)
.credential(credential)
.buildClient();
// Async client
ChatAsyncClient chatAsyncClient = new ChatClientBuilder()
.endpoint(endpoint)
.credential(credential)
.buildAsyncClient();
Key Concepts
| Class | Purpose |
|---|---|
ChatClient |
Create/delete chat threads, get thread clients |
ChatThreadClient |
Operations within a thread (messages, participants, receipts) |
ChatParticipant |
User in a chat thread with display name |
ChatMessage |
Message content, type, sender info, timestamps |
ChatMessageReadReceipt |
Read receipt tracking per participant |
Create Chat Thread
import com.azure.communication.chat.models.*;
import com.azure.communication.common.CommunicationUserIdentifier;
import java.util.ArrayList;
import java.util.List;
// Define participants
List<ChatParticipant> participants = new ArrayList<>();
ChatParticipant participant1 = new ChatParticipant()
.setCommunicationIdentifier(new CommunicationUserIdentifier("<user-id-1>"))
.setDisplayName("Alice");
ChatParticipant participant2 = new ChatParticipant()
.setCommunicationIdentifier(new CommunicationUserIdentifier("<user-id-2>"))
.setDisplayName("Bob");
participants.add(participant1);
participants.add(participant2);
// Create thread
CreateChatThreadOptions options = new CreateChatThreadOptions("Project Discussion")
.setParticipants(participants);
CreateChatThreadResult result = chatClient.createChatThread(options);
String threadId = result.getChatThread().getId();
// Get thread client for operations
ChatThreadClient threadClient = chatClient.getChatThreadClient(threadId);
Send Messages
// Send text message
SendChatMessageOptions messageOptions = new SendChatMessageOptions()
.setContent("Hello, team!")
.setSenderDisplayName("Alice")
.setType(ChatMessageType.TEXT);
SendChatMessageResult sendResult = threadClient.sendMessage(messageOptions);
String messageId = sendResult.getId();
// Send HTML message
SendChatMessageOptions htmlOptions = new SendChatMessageOptions()
.setContent("<strong>Important:</strong> Meeting at 3pm")
.setType(ChatMessageType.HTML);
threadClient.sendMessage(htmlOptions);
Get Messages
import com.azure.core.util.paging.PagedIterable;
// List all messages
PagedIterable<ChatMessage> messages = threadClient.listMessages();
for (ChatMessage message : messages) {
System.out.println("ID: " + message.getId());
System.out.println("Type: " + message.getType());
System.out.println("Content: " + message.getContent().getMessage());
System.out.println("Sender: " + message.getSenderDisplayName());
System.out.println("Created: " + message.getCreatedOn());
// Check if edited or deleted
if (message.getEditedOn() != null) {
System.out.println("Edited: " + message.getEditedOn());
}
if (message.getDeletedOn() != null) {
System.out.println("Deleted: " + message.getDeletedOn());
}
}
// Get specific message
ChatMessage message = threadClient.getMessage(messageId);
Update and Delete Messages
// Update message
UpdateChatMessageOptions updateOptions = new UpdateChatMessageOptions()
.setContent("Updated message content");
threadClient.updateMessage(messageId, updateOptions);
// Delete message
threadClient.deleteMessage(messageId);
Manage Participants
// List participants
PagedIterable<ChatParticipant> participants = threadClient.listParticipants();
for (ChatParticipant participant : participants) {
…
अक्सर पूछे जाने वाले सवाल
'thread' क्या होता है?
'thread' एक खास चैट रूम की तरह होता है जहाँ लोग बात करते हैं।
'read receipts' क्या होते हैं?
'read receipts' वे पुष्टि (confirmations) होते हैं जो दिखाते हैं कि किसी खास मैसेज को किसने पढ़ा है।
क्या मैं फ़ॉर्मेट किए हुए मैसेज भेज सकता हूँ?
हाँ, आप सादे टेक्स्ट मैसेज भेज सकते हैं या HTML का इस्तेमाल करके टेक्स्ट को फ़ॉर्मेट कर सकते हैं, जैसे उसे बोल्ड करना।
जानकारी
लेखक का मूल विवरण
Build real-time chat applications with thread management, messaging, participants, and read receipts.
लोकप्रियता
- GitHub स्टार
- 48k
- रैंकिंग में स्थान
- #3911
- लाइसेंस
- MIT
- अपडेट की गई
- 15/10/2026
कमेंट
- …
इस repository की और skills
00-andruia-consultant
48kआपके एजेंट को AI प्रोजेक्ट शुरू करने या उन्हें बेहतर बनाने में मदद करता है। यह code का विश्लेषण करता है, tools सुझाता है और स्पेनिश भाषा में action plan बनाता है।
007
48kआपका एजेंट security audit और threat modeling करता है। यह प्रोजेक्ट को हमलों और कमजोरियों से बचाने में काम आता है।
10-andruia-skill-smith
48kआपके एजेंट को AI tools बनाने या उन्हें बेहतर करने में मदद करता है। यह तय करता है कि tools कैसे काम करेंगे, documentation लिखता है और structure की जांच करता है।
20-andruia-niche-intelligence
48kआपका एजेंट किसी खास industry का summary बनाता है। भरोसेमंद स्रोतों की मदद से यह प्रोजेक्ट का संदर्भ, नियम, इस्तेमाल के तरीके और जोखिम समझने में मदद करता है।
मिलती-जुलती skills
discord-user-post
394kयह आपके एजेंट को, आपकी मंज़ूरी के बाद, चैनल की पुष्टि करके आपके नाम से Discord डेस्कटॉप ऐप के ज़रिए संदेश भेजने देती है।
configure-channel
394kयह आपके एजेंट को Telegram जैसे चैट ऐप को OpenClaw से जोड़ना, बॉट टोकन सुरक्षित रखना और संदेश आने-जाने की जांच करना सिखाती है।
discord
394kयह आपके एजेंट को OpenClaw के ज़रिए Discord संदेश पढ़ने, भेजने, बदलने और उन पर रिएक्शन देने में मदद करती है, बदलाव से पहले सटीक संदेश जांचकर।