azure-communication-chat-java
하는 일
실시간 채팅 애플리케이션을 만들고 관리하게 해 주는 도구입니다. 사람을 추가하고, 메시지(텍스트 또는 HTML)를 보내고, 누가 메시지를 읽었는지 확인하며, 누군가 입력 중인지 알 수 있습니다.
사용하는 경우
- ✓친구 그룹을 위한 채팅을 만들 때.
- ✓앱을 위한 메시징 시스템을 개발할 때.
- ✓고객 지원을 위해 웹사이트에 채팅을 구현할 때.
스킬 링크
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에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Alice와 Bob이 참여하는 ‘Project Meeting’이라는 채팅을 만들고, Alice로서 ‘여러분 안녕하세요!’라는 메시지를 보내 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
채팅 서비스에 연결하기 위해 ‘클라이언트’라는 특별한 코드를 사용합니다. 이 코드로 채팅방을 만들고, 참가자를 추가하고, 메시지를 보내고 받을 수 있습니다.
기술 내용 (원본 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’는 무엇인가요?
사람들이 대화하는 특정 채팅방과 같습니다.
‘읽음 확인’은 무엇인가요?
특정 메시지를 누가 읽었는지 보여 주는 확인 표시입니다.
서식이 있는 메시지를 보낼 수 있나요?
네, 일반 텍스트 메시지를 보내거나 HTML을 사용해 텍스트를 꾸밀 수 있습니다(예: 굵게).
상세 정보
작성자의 원본 설명
Build real-time chat applications with thread management, messaging, participants, and read receipts.
인기도
- GitHub 스타
- 48k
- 순위
- #3911
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
00-andruia-consultant
48k에이전트가 AI 프로젝트를 시작하거나 개선할 수 있도록 코드를 분석하고 스페인어로 실행 계획을 세워 줍니다.
007
48k에이전트가 보안 감사와 위협 모델링을 수행해 공격과 취약점으로부터 프로젝트를 보호하도록 돕습니다.
10-andruia-skill-smith
48k에이전트가 AI 도구의 작동 방식을 정의하고 문서를 쓰며 구조를 검증하도록 돕습니다.
20-andruia-niche-intelligence
48k에이전트가 신뢰할 수 있는 자료를 바탕으로 특정 산업의 맥락, 규칙, 사용 패턴, 위험을 정리한 요약을 만들도록 돕습니다.
비슷한 스킬
discord-user-post
394k에이전트가 승인한 메시지를 정확한 채널을 확인한 뒤 Discord 데스크톱 앱에서 내 계정으로 올리도록 돕습니다.
configure-channel
394k에이전트에게 Telegram 같은 채팅 앱을 OpenClaw에 연결하고, 봇 토큰을 안전하게 보관하며, 메시지가 오가는지 확인하는 방법을 가르칩니다.
discord
394k에이전트가 OpenClaw를 통해 Discord 메시지를 읽고, 보내고, 수정하고, 반응을 달며, 변경 전에 정확한 메시지를 확인하도록 돕습니다.